"John W. Krahn" wrote: > "R. Joseph Newton" wrote: > > > > Joel Newkirk wrote: > > > > > Well, actually they don't, since the 'bare' # will be interpreted as > > > starting a comment, while the one in quotes won't... ;^) > > > > > > The op's assignment was assigning 'split(/' to @temp... > > > > Did you test. > > Did YOU test?
The code as it is? Nope. Knew the likely result: Greetings! E:\d_drive\perlStuff\JPEG>perl -le' Can't find string terminator "'" anywhere before EOF at -e line 1. > > > > The only problem I see with John's code is that it addumes that > > the print statement will print a newline, > > There is no such assumption, I explicitly told perl to print a newline. I see: [portable--semi, anyway, takes ^D to finish in 'nix] Greetings! E:\d_drive\perlStuff\JPEG>perl -l @temp = split(/#/, "abc#def#ghi#jkl"); print for @temp; ^Z abc def ghi jkl > > > > which it doesn't [at least on my > > installation of V5.8]. On the main point, he is right. > > > > Greetings! E:\d_drive\perlStuff\giffy>perl -w > > How is this supposed to run on the command line without -e ? Wasn't. Runs in the Perl interpreter. That way, I'm not struggling to cram disparate concepts into one line. Greetings! E:\d_drive\perlStuff\giffy>perl -w > > @temp = split(/#/, "abc#def#ghi#jkl"); > > print "$_\n" for @temp; > > ^Z #^D for 'nix > > abc > > def > > ghi > > jkl Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>