Don't ask to ask, just ask | |
PerlMonks |
Re^3: Parsing CSV into a hashby GrandFather (Saint) |
on Sep 19, 2005 at 22:30 UTC ( [id://493318]=note: print w/replies, xml ) | Need Help?? |
That's right. Note also that if there are too few fields in a line this simply assigns undef rather than generating an invalid access as your original code did. If you are sure that the first line contains the header line then you can simply:
before the loop. Perl is Huffman encoded by design.
In Section
Seekers of Perl Wisdom
|
|