in reply to Parsing a text file
What are you trying to do? I don't understand why you're messing with the input record separator ($/).
With a |-delimited file, something like this works:
while(<>) { chomp; my @array = split(/\|/); }
and who cares if any of the elements in @array have \r?
If you're looking to strip \r out of your text, it's just what you'd think it would be:
s/\r//g;
(Welcome to perlmonks!)
Update Ah, I see. Ack! I hate dealing with sloppy data :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing a text file
by rgatliff (Sexton) on Feb 10, 2001 at 16:13 UTC |