http://www.perlmonks.org?node_id=1026009


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

One more reduction and we have to put this node into Obfuscation... ;-)

But while thinking it's interesting it deserves a ++

McA

Replies are listed 'Best First'.
Re^4: Column Heading and Split Function
by hdb (Monsignor) on Mar 28, 2013 at 18:52 UTC
    <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
      $. > 1 and say join ' ', split while <DATA>;
        holy moly... ;-) (yes, yes, also a ++)
        <>; say <>;