sub processFile{ $fn = shift; #open a file through a pipe my %hash = () while( ){ #populate hash } #iterate over keys outputting data }