in reply to Re^4: How do I select first string of a two dimensional array to compare to other values?
in thread How do I select first string of a two dimensional array to compare to other values?
But your code above loops through the entire file of the RAW input handle (assuming the syntax error is fixed), processing and printing every line. (BTW: Nothing is ever written to the OUT handle.)
If you want to process only the first line of RAW, maybe something like (untested):
my $first_line = <RAW>; close RAW or die "closing raw input: $!"; chomp $first_line; my $first_field = split m{ , \s* }xms, $first_line; print "$first_field\n";
Give a man a fish: <%-{-{-{-<
|
|---|