Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: how to make first element of an string as a the array nameby radiantmatrix (Parson) |
on Nov 15, 2007 at 17:04 UTC ( [id://651021]=note: print w/replies, xml ) | Need Help?? |
I don't think you really want to have the first element be a real array name -- do you have a package named IL12::1 ? If you want to reference these things by name, I suggest (as others have) a hash, with the first element of each row in your file being the key. Text::CSV_XS would work wonderfully for this application.
The output from this should look like:
(I've used ... to indicate that there will be more of the same, to save space in this node) I hope that helps!
<–radiant.matrix–>
Ramblings and references The Code that can be seen is not the true Code I haven't found a problem yet that can't be solved by a well-placed trebuchet
In Section
Seekers of Perl Wisdom
|
|