Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl oddities

by Limbic~Region (Chancellor)
on Mar 02, 2005 at 19:22 UTC ( #435979=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Perl oddities
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://435979]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-12-18 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (43 votes), past polls