in reply to Default CGI.pm param() if none provided?
To ensure that you only have word characters in your param, use the beginning and end of string anchors in your regex:# The two argument form of param will set the value param('page','home') if ! defined param('page');
Hope that's what you were looking for!param('page') =~ /^(\w+)$/
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Ovid) Re: Default CGI.pm param() if none provided?
by chromatic (Archbishop) on Dec 28, 2000 at 04:44 UTC | |
by ybiC (Prior) on Dec 28, 2000 at 07:56 UTC | |
|
Re: (Ovid) Re: Default CGI.pm param() if none provided?
by ybiC (Prior) on Dec 28, 2000 at 04:33 UTC |