For Quality purpouses, Lone Wolf 's mail on Thursday 05 February 2004 00:52 may have been monitored or recorded as: > I'm back to dealing with the main issue of a badly formatted file being > brought down from an archaic system and needing to be cleaned up before > being passed to another user or a database table. I have the code
I assume by saying you are back that you are talking ofyour thread from 12/17: "get rid of whitesace around pipes??". > below, which pulls the whole file in and parse it line by line. That > problem is still that when the stuff is done parsing the file, the file > still has a ton of white spaces left in it. did you try something like my @fields = split /\s*\|\s*/, $line; as suggested by James, Jeff and Randy? Why didnt it work - the problem looks still pretty much the same, does it? > What I would like to do is when I first open the file (another piece of > this massive script) is tell it to just run a sub program on each piece > that does the same thing as the stuff below, unfortunately I am not sure > of the way to do this. Frankly, after a while of looking at your code Im still not sure what you want do - that might be due to my ignorance, but you would really help me (and I guess others too) understand, if you could post some sample data before they go into your program and a line of how you expect thme to look like after they were processed by your code - I guess that would make it easier to figure out, where what goes how (or so). Wolf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>