in reply to Default CGI.pm param() if none provided?

Two answers:

1/ My CGI programs are full of code like:

my $thing = param('thing') || 'default_thing';

2/ It looks to me that your regex already does what you want. It will return the first string of \w characters that it finds.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me