Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 examining the Monastery: (9)
As of 2014-08-20 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (114 votes), past polls