hmmm...interesting. it doesn't give me that error but this one lined perl program ends after the first line of input. doesn't wait for EOF i.e. any thoughts?
#/usr/bin/perl print reverse(chomp @lines = <STDIN>); >>perl ex3-1.pl hello hello >> -----Original Message----- From: Greg Meckes [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 3:02 PM To: Sukhpreet Singh; '[EMAIL PROTECTED]' Subject: Re: print chomp How about: print reverse(chomp @lines = <STDIN>); ? Greg --- Sukhpreet Singh <[EMAIL PROTECTED]> wrote: > Why can't I do this? > > print chomp reverse(@lines = <STDIN>); > > or > > print chomp(reverse(@lines = <STDIN>)); > > I get > > Can't modify reverse in chomp at ex3-1.pl line 3, near "))" > Execution of ex3-1.pl aborted due to compilation errors. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]