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

using function output ananymous array vs. named array in foreach

by ISAI student (Scribe)
on Dec 26, 2012 at 10:42 UTC ( #1010354=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @lines=foo('bar');
    foreach my $line (@lines) {
     $a.=chomp $line ;
     $b*= getVa($line);# a parsing function
    }
    
  2. or download this
    foreach my $line ( foo('bar') ) {
     $a.=chomp $line ;
     $b*= getVa($line);#a parsing function
    
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010354]
Approved by NetWallah
Front-paged by NetWallah
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-09-21 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls