when I call a sub, I check wich sub is called. When I call , I want to give the param 1001 to the sub delete. here my code, I don"t know how to make this . . .
$referer = $ENV{HTTP_REFERER};
if(($action eq "delete"
&& ($referer =~ "$scripturl"
) {
&delete;
}
else {
&login;
}
#and here the sub delete
sub delete {
my $obj = new CGI;
my $todelete = $obj->param('delete');
#the message in the heat of the &main
$message = "The numbers $todelete was deleted";
#add the deleted numbers to the rest of the deleted numbers
push @did, $addoffers;
&main;
}
$referer = $ENV{HTTP_REFERER};
if(($action eq "delete"
&delete;
}
else {
&login;
}
#and here the sub delete
sub delete {
my $obj = new CGI;
my $todelete = $obj->param('delete');
#the message in the heat of the &main
$message = "The numbers $todelete was deleted";
#add the deleted numbers to the rest of the deleted numbers
push @did, $addoffers;
&main;
}