in reply to Re^2: Searching through a hash
in thread Searching through a hash

$cols contains a reference to a hash. %$cols (short for %{$cols}) means to access the hash referenced by the reference in $cols. See perlref.

my @sorted_col_names = sort { length($a) <=> length($b) || $a cmp $b } keys %$cols; foreach my $col_name (@sorted_col_names) { my $cell = $col->{$col_name}; print("$cell\t"); } print("\n");