http://www.perlmonks.org?node_id=435979


in reply to Perl oddities

brian_d_foy,
I find the way Perl handles mixed tied interfaces odd.
use Tie::Hash::Sorted; tie my %s_hash, 'Tie::Hash::Sorted'; print tied( %sorted_data )->Count, "\n";
The alternative is to split the functionality into two pieces.
my $s_href = tie my %s_hash, 'Tie::Hash::Sorted'; print "$_\n" for keys %s_hash; print $s_href->Count, "\n";

Cheers - L~R