Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re5: Some suggestions on coding style - a chance to critique

by blakem (Monsignor)
on Jul 01, 2002 at 21:03 UTC ( [id://178682]=note: print w/replies, xml ) Need Help??


in reply to Re4: Some suggestions on coding style - a chance to critique
in thread Some suggestions on coding style - a chance to critique

Doh! Nevermind....

I can see the interpolation problem, but whats this about not using a constant as a hash key?

#!/usr/bin/perl -w use strict; use constant LOG_DIRECTORY => '/foo/bar/baz'; my %hash; $hash{LOG_DIRECTORY} = 'happy'; print "log directory ${\LOG_DIRECTORY} is $hash{LOG_DIRECTORY}\n"; __END__ produces: log directory /foo/bar/baz is happy

-Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-25 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found