Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: string initialization error

by hippo (Bishop)
on Dec 21, 2018 at 15:15 UTC ( [id://1227569]=note: print w/replies, xml ) Need Help??


in reply to string initialization error

my $page = ""; $page = $query->param("page");

Don't do that if you want to test $page afterwards. Instead do something like this:

my $page = $query->param ('page') || '';

This way $page will always be defined, even if you don't have a param with the name "page".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found