Quick question here for the PERL gurus!
What should be the order for these two statements?
exit;
last switch;
i.e is this correct?
Thanks!!
Dave -- Ft. Worth
__CODE__
SWITCH: {
if ($action =~ /Update/) {
print redirect("./import_clean_csv.php");
exit;
last switch;
};
if ($action =~ /Clean/) {
print header;
chdir UPLOAD_DIR or die "Couldn't chdir to afm_data directory: $!";
my @filesToRemove = <*>;
foreach my $fr (@filesToRemove) {
print "Deleting $fr<br>\n";
unlink($fr) or die "Couldn't Delete $fr $!";
}
print <<HTML_OUT;
<p style="font-weight:bold">Your Done close this window!
<form><input type="button" onclick="self.close()" value="Close
Window"></form></p>
HTML_OUT
exit;
last switch;
};
}
Visit my schedule page for up to the minute performance info:
<http://www.coraconnection.com/cgi-bin/schedule.pl>
==============================================
Cora Connection: Your West African Music Source
Resources, Recordings, Instruments & More!
<http://www.coraconnection.com/>
==============================================
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>