Here is the basic structure you want.
#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; my $flag = $q->param('flag'); my $message = get_data(); display_page($message); # do mysub() if 'flag' set mysub() if $flag eq 'do_it'; exit; #### Subs #### sub display_page { my $message = shift; print $q->header, $message; } sub mysub {} sub get_data { }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Run a subroutine on "Submit"
by tachyon
in thread Run a subroutine on "Submit"
by Donnie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |