Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: replacing literals with constants

by Corion (Patriarch)
on May 14, 2022 at 09:15 UTC ( [id://11143894]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
      print $i, "\n";
    }
    print "-> unexpected\n\n";
    
  2. or download this
    corion@outerlimits:~/Projekte$ perl -MO=Deparse tmp.pl 
    BEGIN { $^W = 1; }
    ...
    }
    print "-> unexpected\n\n";
    tmp.pl syntax OK
    
  3. or download this
    sub ten() { 10 };
    
  4. or download this
    use constant ten => 10;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found