Naser Ali wrote: > I used "\s*" in split, so I do not have worry about counting the > spaces or tabs between each field
I noticed something in the OP that didn't really get addressed: \s* will match an empty string, which will split into a list of single characters. $ perl -le 'print for split /\s*/, "foo bar"' f o o b a r You want \s+, or even better ' ' (there is a slight difference between the two) $ perl -le 'print for split q[ ], "foo bar"' foo bar perldoc -f split gives all the gory details. HTH -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>