Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Using constants as hash keys

by Athanasius (Archbishop)
on Jan 05, 2018 at 15:10 UTC ( [id://1206759]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     0:59 >perl -Mstrict -MData::Dump -MConst::Fast -we "use constant A =>
    + 12; const our $B => 13; my %h = ( (A) => 'twelve', $B => 'thirteen')
    +; dd \%h;"
    { 12 => "twelve", 13 => "thirteen" }
    ...
    -e syntax OK
    
     0:59 >
    
  2. or download this
    use constant DEBUG => 0;
    ...
    perform_some_debugging_operation() if DEBUG;
    ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found