sub spankTheMonkey { my( $infh ) = @_; my @full_data; my $header = readline $infh; if( $header =~ /\d+/ ) { ## in case there is no header push @full_data, [ split ' ', $header ]; } push @full_data, [split] while( <$infh> ); return \@full_data; } ## end sub spankTheMonkey