There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
scalar(@$colref) is the number of items found in the column, it would never contain a '#' symbol. $colref->[0] is the first item on the line read in, it could contain a # symbol.
Notice i said next rather than last. next will go on to the next row, last will end the do loop and stop reading any more lines. the next condition is a touch more tricky. See we have to test all of the items in this case. Note th use of last here, as soon as we have found any nonblank we dont have to check anymore. edit: opps , fixed as per Re^6: Read CSV with column mapping below In reply to Re^5: Read CSV with column mapping
by huck
|
|