Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Just another Perl shrine
 
PerlMonks  

Re: Baby Steps

by PipTigger (Hermit)
on Jun 22, 2000 at 19:44 UTC ( [id://19493]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Baby Steps "if" behavior?

... also: Does `$kaka = param("formkaka");` define $kaka (according to if (defined $kaka)) even if the parameter "formkaka" was not submitted? Thanks again. TTFN

-PipTigger

p.s. I just realized that root@eruditorium.org is not necessarily the superuser of that server since Enoch is... =)!
p.p.s. Do we have to escape double quotes in titles somehow so that they appear correctly? I missed that too!
p.p.p.s. Please forgive me for forgetting to close the anchor tag in the main post. I'd change it if I could.

Replies are listed 'Best First'.
RE: Re: Baby Steps
by chromatic (Archbishop) on Jun 22, 2000 at 19:55 UTC
    If you're using CGI.pm, it looks like calling param() for an unsubmitted parameter returns undef. The snippet I used to test this is:

    print "Undefined parameter: >>"; print defined ($q->param('undefined')) ? "defined" : "not defined"; print "<<\n<p>";
    (Obviously, there's more to it than that, but anyone who knows enough to ask this question ought to know what else to add.)
RE: Re: Baby Steps
by wayne keenan (Novice) on Jun 23, 2000 at 13:01 UTC
    'exists' is used to find out if a hash key exists, this is needed because perl will create a key/value pair even if you are just 'seeing if it's there'. (e.g, its not use on scalars as such) also, the -e (and friends) flags are file test operators where parameter is the name of a file. if (-e /mnt/dos/command.com) { print "good choice, show who's in charge\n"; } see 'perldoc perlfunc' for a list of the file tests you can perform.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19493]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.