Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Determine first element in foreach

by frozenwithjoy (Priest)
on Aug 04, 2014 at 18:34 UTC ( #1096181=note: print w/replies, xml ) Need Help??


in reply to Determine first element in foreach

Yet another option:
my @my_list = (...); treat_all(@my_list); sub treat_all { my ( $first, @others ) = @_; treat_1($first); treat_others($_) for @others; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2023-04-01 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?