[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] simple syntax question



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