for my $info ( # This ^^^^^ var will be set to the hashref each of the ... grep{ exists $ProcsOfInterest{ lc $_->{ Name } } } @proc_info # ...............^^^^^^^^^^^^^^^^ processes of interest ) { # ........................and is used here vvvvv printf "%-25s %14d %12.6f %14.7f\n", @{ $info }{ @fields }; # .......................in a hash slice ^^ ^^ ^ # ............................with the field names ^^^^^^^ # ..to produce the wanted 4 values and supply them to printf }