Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: perlcaller.pl

by Juerd (Abbot)
on Jan 21, 2002 at 17:42 UTC ( #140385=note: print w/ replies, xml ) Need Help??


in reply to perlcaller.pl

Why do you use TRUE and FALSE constants? Perl already has some sense of true and false ("", "0", 0 and undef are false, all other values are true).
If you ever need a representation in terms of 1 or 0, just use ?:.

$foo ? 1 : 0;
(Or the more evil !!$foo || 0 :))

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$


Comment on Re: perlcaller.pl
Select or Download Code
Re: Re: perlcaller.pl
by jryan (Vicar) on Jan 22, 2002 at 01:56 UTC
    While you are correct, (and I ++'ed ya), perhaps he is more familiar with another programming language where those constants do exist (such as java)? You have to admit that it does make the program easier to read, and easier to maintain for a non-native perl programmer. Thats not to say I'd do it myself, but if it helps Dave write code that he is more comfortable with, why not? TIMTOWTDI, right? :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2014-10-25 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (139 votes), past polls