Problems? Is your data what you think it is? | |
PerlMonks |
Re: Regex problemby bioMan (Beadle) |
on Oct 05, 2005 at 16:43 UTC ( [id://497670]=note: print w/replies, xml ) | Need Help?? |
I see there's a lot of repetition.
Why not slurp the file into a scalar (Perl Slurp-eaze), split the file at the tabs, and send the data to an array.
Update - Oops! As noted out by ikegami the split statement should read:
Update - Aaaaaaaa! A little testing shows both "/t" and /\t/ will work with split. If you need to check the individual values create a simpler regex and apply it to each array item.
Mike "I need more cow bell!"
In Section
Seekers of Perl Wisdom
|
|