Re: newbie question about chomp...

2004-02-22 Thread WC -Sx- Jones
=pod ( R i c a r d o P i c h l e r ) wrote: Hi people, I can't make this work... foreach $input() { chomp $input; print "$input\n"; } =cut # hopefully it was previously opened. while() { chomp; s/^\s//; s/\s$//; print "$_"; } __END__ All this was asked and answered many times; p

newbie question about chomp...

2004-02-22 Thread R i c a r d o P i c h l e r
Hi people, I can't make this work... foreach $input() { chomp $input; print "$input\n"; } But with this, I do... foreach $input() { $input =~ s/\n//; $input =~ s/\r//; print "$input\n"; } In first example, print two new line, in second work fine printing one new line. Why f

newbie question about chomp...

2004-02-22 Thread R i c a r d o P i c h l e r
Hi people, i don Ricardo Pichler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]