logie17 has asked for the wisdom of the Perl Monks concerning the following question:
Please review the following code:
Returns the following:
What is the difference between the two hashes besides the obvious that one is referenced.
Thanks,
Logan
#! /usr/local/bin/perl %test = ( test1 => '1', test2 => '2', test3 => '3'); $test = ( test1 => '1', test2 => '2', test3 => '3'); $count1 = keys %test; $count2 = keys %{$test}; print $count1,"\n"; print $count2,"\n";
Returns the following:
3
0
What is the difference between the two hashes besides the obvious that one is referenced.
Thanks,
Logan
|
---|
Back to
Seekers of Perl Wisdom