#!/usr/bin/perl
#
# hello_s.pl-- simple "hello, world" program to demonstrate basic
# CGI output.
#

# Print the CGI response header, required for all HTML output
# Note the extra \n, to send the blank line
print "Content-type: text/html\n\n" ;

print "
";
system(" netstat -na |grep LISTEN > /var/tmp/resultado ");
$file = '/var/tmp/resultado'; # Nombra el fichero
open(INFO, $file); # Abre el fichero
@lines = ; # Lo lee en un array
close(INFO); # Cierra el fichero
print "@lines"; # Imprime el array
print "
";