Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: string initialization errorby perlancar (Hermit) |
on Dec 21, 2018 at 14:25 UTC ( [id://1227568]=note: print w/replies, xml ) | Need Help?? |
It looks like you set $page to "" and then possibly set it to undef in the following line if there is no query parameter named "page". By the time perl compares $page to 'main', it's getting an undef value. You probably meant something like: my $page = $query->param("page") // ''; or: my $page = $query->param("page") || '';
In Section
Seekers of Perl Wisdom
|
|