in reply to help on this code below
A few comments:
foreach $key (sort {$a <=> $b} $query->param()) { # rearrange: next if ($query->param($key) =~ /^\s*$/); next if ($key !~ /^filetoupload_(\d+)$/); # next condition is a subset of the previous condition # i.e., $key cannot be empty AND match filetoupload_\d+ #next if ($key =~ /^\s*$/); $Number = $1; # only one matching group: ( ) if ($query->param($key) =~ /([^\/\\]+)$/) { $Filename = $1; $Filename =~ s/^\.+//; # hence, no $2 #$pxuser = $2; #$pxuser =~ s/^\.+//; $files{$Number} = $Filename; $File_Handle = $query->param($key); if (!$ALLOW_INDEX && $Filename =~ /^index/i) { print header;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help on this code below
by sasidhardv (Initiate) on Oct 27, 2011 at 18:24 UTC | |
by hbm (Hermit) on Oct 27, 2011 at 18:52 UTC |