On Dec 17, 2003, at 10:26 AM, LoneWolf wrote:

I am parsing a massive file line by line and cleaning it up. It has about
15 fields, all separated by | and I want to remove the white space from
before and after the pipes so that as the information is parsed it gets rid
of external white spaces from the string and such.

Try something like:


my @fields = split /\s*\|\s*/, $line;

Good luck.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to