Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!uflorida!novavax!hcx1!bill From: bill@ssd.harris.com (Bill Leonard) Newsgroups: comp.lang.perl Subject: Perl problem: bogus message Message-ID: Date: 15 Dec 89 18:19:43 GMT Sender: news@hcx1.UUCP Distribution: comp.lang.perl Organization: Harris Computer Systems Division Lines: 34 Executing the following script on a Harris HCX running CX/UX: #!/usr/bin/perl sub rpt_for_ol { # Print the argument string as many times as there are elements in the # @x array. local($str) = @_ ; foreach $temp (@x) { print(STDOUT $str) ; } } @x = (1, 2, 3, 4) ; $y = " | c s" ; do &rpt_for_ol($y) ; print("\n") ; generates the following output: Unrecognized character \203 ignored at /usr/local/lib/perl/ line 1. Unrecognized character \001 ignored at /usr/local/lib/perl/ line 1. | c s | c s | c s | c s I cannot figure out why I am getting these messages. If I change the foreach to a for loop that indexes array @x, the messages go away. However, a larger script (from whence this small example came) gives dozens of these messages, and changing foreach to for doesn't seem to help. I suspect changing the loop somehow just changes random trash in memory somewhere, but I don't know where or why. Can anyone help? -- Bill Leonard Harris Computer Systems Division 2101 W. Cypress Creek Road Fort Lauderdale, FL 33309 bill@ssd.csd.harris.com or hcx1!bill@uunet.uu.net