That slurps the entire file into the array, not just the first line.
Try: my $header = shift <FH>;
Or: my @header = split(/,/, shift <FH>);
Or the better option as has already been suggested would be to use the Text::CSV module or one of its brethren.
In reply to Re: Printing particular column is not working
by fishmonger
in thread Printing particular column is not working
by kumarkeyan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |