in reply to a way to do 'sort|uniq'

@_{@telephones}=(),print+join$/,sort{ $a <=> $b }keys%_;


Replies are listed 'Best First'.
Re^2: a way to do 'sort|uniq'
by jch341277 (Sexton) on Aug 02, 2005 at 18:35 UTC

    sh1tn - I don't understand how this works:

    @_{@telephones}=(),print+join$/,sort{ $a <=> $b }keys%_;

    I hope you're not disinclined to explain?

      @_{@telephones}=(); # %_ hash from @telephones print+ # print the join $/, # joined with "\n" separator sort{ $a <=> $b }keys%_; # list which comes from %_ keys