( 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(<INPUT_FILE>) { chomp $input; print "$input\n"; }
=cut
# hopefully it was previously opened.
while(<INPUT_FILE>) { chomp; s/^\s//; s/\s$//; print "$_"; }
__END__
All this was asked and answered many times; please review the archives for CHOMP Newlines and/or Line endings...
HTH/Sx =)
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>