versed.
First let me tell you what you're doing wrong. chomp() does not return
the modified strings, it returns the NUMBER of elements it chomped.
@a = ("yes\n", "no", "no", "no", "yes\n");
print chomp @a; # 2
If you want the chomp()ed e
m: 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 = );
?
Greg
--- Sukhpreet Singh <[EMAIL PROTECTED]> wrote:
> Why can't I do this
How about: print reverse(chomp @lines = );
?
Greg
--- Sukhpreet Singh <[EMAIL PROTECTED]> wrote:
> Why can't I do this?
>
> print chomp reverse(@lines = );
>
> or
>
> print chomp(reverse(@lines = ));
>
> I get
>
> Can't modify reverse in c
Why can't I do this?
print chomp reverse(@lines = );
or
print chomp(reverse(@lines = ));
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 additio