![]() |
|
"be consistent" | |
PerlMonks |
Re^3: sorting a complex multidimensional hashby envirodug (Novice) |
on Jul 22, 2004 at 19:29 UTC ( #376693=note: print w/replies, xml ) | Need Help?? |
i can definately handle faster ... question: the output from the first example was formatted as following: "{$_->[ 0 ]}{$_->[ 1 ]} => $hash{ $_->[ 0 ] }{ $_->[ 1 ] }" the output from the new example prints the 'values' of the hash: substr( $_, 1+index( $_, '|' ) ). i tried substituting "{$_->[ 0 ]}{$_->[ 1 ]} => $hash{ $_->[ 0 ] }{ $_->[ 1 ] }" from the first example into the second example where substr( $_, 1+index( $_, '|' ) ) was found, but i'm seeing an error: Can't use string ("") as an ARRAY ref while "strict refs" in use at ./test4.pl line 42 would anyone know how I would need to format this code ({$_->[ 0 ]}{$_->[ 1 ]} => $hash{ $_->[ 0 ] }{ $_->[ 1 ] }) to work in the second example and print information formatted similar to the first example? (i know enough perl to 'get myself in trouble') again, many thanks for everyone's help
In Section
Seekers of Perl Wisdom
|
|