Thread CGI.pm (9 answers)
Opened by esskar at 2004-04-10 13:22

Strat
 2004-04-11 17:45
#2083 #2083
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
oder einfach eine eigene Subroutine mit defined-abfragen machen...
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
my $params = &CheckParams($cgi, a => 20, b => 40, c => 50);

sub CheckParams {
 my ($cgi, %standardParameters) = @_;

 my $params = $cgi->Vars();
 foreach (keys %standardParameters) {
   unless (defined $params->{$_}) {
     $params->{$_} = defined($standardParameters{$_}) ? $standardParameters{$_} : '';
   } # unless
 } # foreach
 return $params;
}
\n\n

<!--EDIT|Strat|1081691167-->
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/

View full thread CGI.pm