Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$input # something sent to the script to direct it's path such as a hidden form element with a value assigned
if($input == 0){&sub1}
elsif($input == 1){&sub2}
########Sub 1#######
sub sub1
# your sub here
#######Sub 2########
sub sub2
#your sub here
if ($extractedString eq "TOTO") {
# call function "run" in file toto.pl
} elsif ($extractedString eq "TATA") {
# call function "run" in file tata.pl
} else {
# call function "run" in garbadge.pl
}
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print <<header;
<html>
<head>
<title>Page Auto Forward</title>
</head>
<body onLoad="send()">
<SCRIPT LANGUAGE="javascript">
function send()
{document.theForm.submit()}
</SCRIPT>
header
if ($extractedString eq "TOTO") { # call function "run" in file toto.pl
print <<TOTO;
<form name="theForm" method="post" Action='toto.pl'>
<input type="Hidden" Value = "Call Variable" name="FormType">
</form>
TOTO
} elsif ($extractedString eq "TATA") { # call function "run" in file tata.pl
print <<TATA;
<form name="theForm" method="post" Action='tata.pl'>
<input type="Hidden" Value = "Call Variable" name="FormType">
</form>
TOTO
}
else { # call function "run" in garbadge.pl
print <<garbadge;
<form name="theForm" method="post" Action='garbadge.pl'>
<input type="Hidden" Value = "Call Variable" name="FormType">
</form>
garbadge
}
print "</body></html>";
print $CGIHandle->redirect(-url => "toto.pl") ;
if ($extractedString eq "TOTO") {
import("TOTO.pl") ; $exe = "run()" ; eval($exe) ;
}
require "config.pl";