Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
laziness, impatience, and hubris
 
PerlMonks  

Re: using function output ananymous array vs. named array in foreach

by BrowserUk (Pope)
on Dec 26, 2012 at 11:48 UTC ( #1010365=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @lines = foo( 'bar' );
    chomp @lines;
    my $a = join '', @lines;
    my $b; $b *= getVa( $_ ) for @lines;
    undef @lines;
    
  2. or download this
    sub foo{
         my $bar = shift;
    ...
    }
    
    my( $a, $b ) = foo( 'bar' );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-04-20 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls