1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/usr/bin/perl
use strict;
use CGI;
use Tk;
my $cgi = new CGI;
print $cgi->header;
print $cgi->start_html(
-title=>'Melodie',
-style=> { -src => '/var/cgi-bin/test.css', type => 'text/css', -media => 'all'},
);
print "<h1>HELLO WORLD ! </h1>";
print $cgi->start_form(
-name => 'form',
-method => 'POST',
);
my $button = $cgi->button(
-name => 'command',
-value => 'ls',
);
print $button;
print $cgi->br();
print $cgi->submit();
my $command = $cgi->param('button');
system "$command";
print $cgi->end_form;
print $cgi->end_html; |
Partager