On Mon, 18 Feb 2002 at 18:48 GMT, David Gilden wrote: > Hi, > > My goal is to clean up the fields submitted from a form and then be > able to use them in other places. > > Do I have to assign my 'cleaned' data to a hash?
You can try it by yourself: #!/usr/bin/perl -w use strict; use CGI qw(:cgi); foreach my $key ( param() ) { my $value = param($key); # Fetch the parameter value $value =~ s/^\s*|\d*\s*$//g; # Strip whitespaces and trailing digits param( $key, $value ); # Reassigning the value in the parameter } # We verify the parameters to see if the values were changed foreach ( param() ) { print "$_ => '", param($_), "'\n"; } __END__ -- briac << dynamic .sig on strike, we apologize for the inconvenience >> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]