in reply to chomp() problems
chomp will only remove the systems $/ ($INPUT_RECORD_SEPARATOR). In most Unix it is just \n, in DOS it's \r\n.
I guess you could fix the problem by:
I guess you could fix the problem by:
Edited to correct typo, and again edited to correct a typo and again edited to fix a type. A sick infant does wonders to your sleep habits, and therfore your typing skils ;) Note to self, do not post anything after cleaning up baby vomit. ;){ local $/ = "\r\n"; chomp ($line); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: chomp() problems
by bart (Canon) on Sep 25, 2002 at 00:51 UTC | |
Re: Re: chomp() problems
by fglock (Vicar) on Sep 24, 2002 at 17:56 UTC | |
Re^2: chomp() problems
by Aristotle (Chancellor) on Sep 24, 2002 at 17:43 UTC | |
Re: Re: chomp() problems
by Wally Hartshorn (Hermit) on Sep 24, 2002 at 18:36 UTC |
In Section
Seekers of Perl Wisdom