Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: top ten things every Perl hacker should know

by qq (Hermit)
on Mar 18, 2006 at 20:21 UTC ( #537690=note: print w/ replies, xml ) Need Help??


in reply to Re^5: top ten things every Perl hacker should know
in thread top ten things every Perl hacker should know

We sort of have a sort_by method in Sort::Maker. But I've never liked the api. There is no denying that an ST is a scary sight to a new programmer not familiar with the idiom. I'd argue it should be wrapped in a sub for clarity most often.

I like the PBP argument for using List::Util and List::MoreUtils functions such as any rather than idiomatic uses of grep. It makes your intention clear, and prevents you from thinking in syntax - no matter how comfortable and familiar that syntax is.

update: added some words for clarity


Comment on Re^6: top ten things every Perl hacker should know
Select or Download Code
Re^7: top ten things every Perl hacker should know
by salva (Abbot) on Mar 20, 2006 at 15:55 UTC
    We sort of have a sort_by method in Sort::Maker. But I've never liked the api

    you should try Sort::Key, it has a very simple API and it's faster and uses less memory than any other perl sorting technique:

    use Sort::Key qw(keysort); my @sorted = keysort { genkey($_) } @data;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-07-01 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (19 votes), past polls