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

Re: A variable variable.

by quidity (Pilgrim)
on Nov 23, 2000 at 04:23 UTC ( [id://43060]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    bash-2.03$ perl -e'$foo = "bar"; $$foo = 1; print "$bar\n"'
    1
    
  2. or download this
    foreach (@array) {
      my ($key, $val) = split(/=/, $_);
      $vars{$key} = $val;
    }
    
  3. or download this
    foreach (@array) {
      next unless /var(\d+)=(.*)/;
      $values[$1] = $2;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://43060]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-23 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found