Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: How do I select first string of a two dimensional array to compare to other values?

by AnomalousMonk (Archbishop)
on Aug 31, 2015 at 01:30 UTC ( [id://1140488]=note: print w/replies, xml ) Need Help??


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:  <%-{-{-{-<

  • Comment on Re^5: How do I select first string of a two dimensional array to compare to other values?
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1140488]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found