Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: string initialization errorby haukex (Archbishop) |
on Dec 21, 2018 at 15:44 UTC ( [id://1227571]=note: print w/replies, xml ) | Need Help?? |
or: my $page = $query->param("page") || ''; Caveat: That will also assign '' to $page if $query->param("page") returns 0 or "0" (the same applies to hippo's answer). TIMTOWTDI: Another alternative to the code from the OP may be (at least on Perl v5.12 and up):
In Section
Seekers of Perl Wisdom
|
|