Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
more useful options
 
PerlMonks  

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

by blakem (Monsignor)
on Jul 01, 2002 at 21:03 UTC ( #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


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-04-20 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls