Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 browsing the Monastery: (8)
As of 2014-07-11 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls