[Omaha.pm] simple syntax question

Ryan Stille rps at willconsult.com
Wed Jul 28 11:48:57 CDT 2004


I need to alter the value of some elements passed in from a form, using a regular expression.   The only way I could think of to do it was like this:

$tmp1 = $FORM->param('respond_email');
$tmp2 = $FORM->param('name');
$tmp1 =~ s/\n|\r//g;
$tmp2 =~ s/\n|\r//g;
$FORM->param(-name=>'respond_email',-value=>$tmp1);
$FORM->param(-name=>'name',         -value=>$tmp2);

Which I'm sure is not the most elegant.  Is there a way to do it without using the tmp variables?

-Ryan




More information about the Omaha-pm mailing list