Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Invalid use of constant pragma?

by Fastolfe (Vicar)
on Nov 29, 2001 at 09:22 UTC ( [id://128285]=note: print w/replies, xml ) Need Help??


in reply to Re: Invalid use of constant pragma?
in thread Invalid use of constant pragma?

The fact that $ARGV[1] (thus ARCHIVE) is undef and not an empty string isn't really relevent. He's doing a test for string equality via eq, and undef stringifies to an empty string, so the test should succeed.
$ perl -e 'print "OK\n" if undef eq ""' OK

Replies are listed 'Best First'.
Invalid use of constant pragma?
by mikeB (Friar) on Nov 29, 2001 at 20:50 UTC
    D'Oh! You are, of course, correct :/

    I'll just pass along tye's CB suggestion that perhaps use strict; would be in order, to verify no typos exist in the actual code.

    Mike

    use strict; - don't leave home without it

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 22:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found