Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: A better (ie.more concise) way to write this?

by johngg (Canon)
on Dec 14, 2013 at 12:47 UTC ( [id://1067134]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -Mstrict -Mwarnings -E '
    my @a = ( 1 .. 10 );
    ...
    sub transform (&@) { map $_[ 0 ]->( $_ ), @_[ 1 .. $#_ ] }'
    2 3 4 5 6 7 8 9 0 1
    $
    
  2. or download this
    $ perl -Mstrict -Mwarnings -E '
    my @a = ( 1 .. 10 );
    ...
    sub transform (&) { $_[ 0 ]->( $_ ) }'
    2 3 4 5 6 7 8 9 10 11
    $
    
  3. or download this
    $ perl -Mstrict -Mwarnings -E '
    my @a = ( 1 .. 10 );
    ...
    sub transform (&) { $_[ 0 ]->( $_ ) }'
    2 3 4 5 6 7 8 9 0 1
    $
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-18 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found