Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Creating dispatch table with variable in function name

by Laurent_R (Canon)
on Nov 22, 2017 at 19:04 UTC ( [id://1204059]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<1> ($blue, $red) = qw / b r/;
    
      DB<2> say  ${$_} for qw /blue red/;
    b
    r
    
  2. or download this
    $ perl -Mstrict -E 'our ($blue, $red) = qw / b r/; say  ${$_} for qw /
    +blue red/;'
    Can't use string ("blue") as a SCALAR ref while "strict refs" in use a
    +t -e line 1.
    
  3. or download this
      DB<3> say ${ "bl" . "ue"};
    b
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-18 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found