Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^4: Column Heading and Split Function

by hdb (Prior)
on Mar 28, 2013 at 18:52 UTC ( #1026018=note: print w/ replies, xml ) Need Help??

in reply to Re^3: Column Heading and Split Function
in thread Title of Column and Split Function

<DATA>; # remove header line $/=undef; # instead of File::Slurp my %rates = split /\s+/, <DATA>; print map { "$_ $rates{$_}\n" } keys %rates; __DATA__ Patient Heart Rates Molly 70 Glenn 69

Replies are listed 'Best First'.
Re^5: Column Heading and Split Function
by Not_a_Number (Parson) on Mar 28, 2013 at 20:07 UTC
    $. > 1 and say join ' ', split while <DATA>;
      holy moly... ;-) (yes, yes, also a ++)
      <>; say <>;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2016-08-26 23:48 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (375 votes). Check out past polls.