Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: List-to-Scalar Function?

by perlmonkey (Hermit)
on May 09, 2001 at 03:45 UTC ( #78994=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub operate (&@) {
      my $sub = shift;
      local $~;
      $~ = &$sub($_) for @_;
      return $~
    }
    
  2. or download this
    use strict;
    sub operate (&@) {
      my $sub = shift;
    ...
    open FILE, $0;
    my $count = operate { $~ + /operate/ } <FILE>;
    print "Count = $count\n";
    
  3. or download this
    max = 645
    string = 462671236452354
    count = 4
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-10-02 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (8 votes). Check out past polls.

    Notices?