Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
"be consistent"
 
PerlMonks  

Dereference string in foreach

by Anonymous Monk
on Feb 13, 2013 at 20:02 UTC ( #1018620=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $sref = \$string;
    foreach $string ( @array_of_strings ) {
        print $$sref;
    }
    
  2. or download this
    $sref \$string1;
    foreach $string2 ( @array_of_strings ) {
        $string1 = $string2;
        print $$sref;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-04-24 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls