Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
No such thing as a small change
 
PerlMonks  

Re: symbolic references

by tall_man (Parson)
on Sep 27, 2005 at 15:21 UTC ( [id://495517]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to symbolic references

Here's another way. The "foreach" statement automatically aliases the loop variable to the items in the list, so you could just do:
use strict; my $varA = "this is varA"; my $varB = "this is varB"; my $varC; print "\n"; foreach my $f ($varA, $varB, $varC) { if ( defined $f ) { print "--- $f \n"; my $tmp = $f . " and some more "; print "----- $tmp \n"; $f = $tmp; print "===== $f \n"; } } print "\n"; foreach my $f ( $varA, $varB, $varC ) { print "+ $f \n"; } print "\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://495517]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.