There's more than one way to do things | |
PerlMonks |
Re: building Drop down menu - from a flat fileby gryphon (Abbot) |
on Jul 24, 2002 at 16:20 UTC ( [id://184924]=note: print w/replies, xml ) | Need Help?? |
Greetings data67, If it was me, I'd read through the file, splitting each line and pushing a particular element into an array (if you just want each value in the column) or a hash (if you want distinct fields). The below example uses both together. (Don't do this. Just pick one of the two.)
There's probably a way to do this in one line with map, but I'm not merlyn or IO, and I haven't had my first cup of coffee yet. -gryphon
In Section
Seekers of Perl Wisdom
|
|