Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How do I write subs that take bare blocks as args?

by kvale (Monsignor)
on Jun 28, 2002 at 06:02 UTC ( #177943=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub first (&@) {
      my $code = shift;
    ...
    
      undef;
    }
    
  2. or download this
    # first defined value in @list
    $foo = first { defined($_) } @list;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177943]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-09-23 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (270 votes). Check out past polls.

    Notices?