You can return multiple results as:
Of these, I'd pick one of the references as these package the data and you're only passing around a single scalar value. Further, I'd choose the hashref over the arrayref because you're not restricted to the order of the results and dealing with the returned values is easier and more readable. Consider:
my $h = hlookup(...); # First cell value with arrayref my $first_cell = $h[1]; # First cell value with hashref my $first_cell = $h{first_cell};
-- Ken
In reply to Re: Parse .csv file
by kcott
in thread Parse .csv file
by Sherlock Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |