Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 browsing the Monastery: (13)
As of 2015-07-29 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls