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


in reply to Re: Specify sort method on the fly
in thread Specify sort method on the fly

my $sort = { };? my %sort = ( );!

Replies are listed 'Best First'.
Re^3: Specify sort method on the fly
by eric256 (Parson) on Jan 21, 2010 at 15:05 UTC

    I tend to use references always, dunno why, habit i suppose. I like the way they look?


    ___________
    Eric Hodges

      I go for references too. Couple of justifications:

      Since I almost always want to pass by reference to avoid copying, and often want to pass in multiple arrays or hashes, having a reference is a good default.
      Not having non-reffed arrays and hashes floating around means more consistency in the use of $ and -> almost everywhere.