We don't bite newbies here... much | |
PerlMonks |
Re: String parsingby Abigail-II (Bishop) |
on Jan 05, 2004 at 12:35 UTC ( [id://318827]=note: print w/replies, xml ) | Need Help?? |
Your data lines are different enough that each type needs its own parser.Uhm, no, as shown in several other replies. A hash of coderefs ("dispatch table") will do that nicely,Actually, your solution is very inflexible. It can't even deal with: (only the exit value is different from the original). It'll produce an error, as Perl will try to use an undefined value as a code reference. Abigail
In Section
Seekers of Perl Wisdom
|
|