#!/usr/local/bin/perl -w
use strict ;
use English ;
use Socket ;
use CGI qw/:all/ ;
my($rec) ;
my(@Record) ;
my($cgi) ;
my(%Hash) ;
my($String) ;
my($item) ;
$cgi = new CGI ;
#
# See if there were passed values from the input form
#
if ( $cgi->param('string') ) {$String = $cgi->param('string') ;};
if ( $cgi->param('array') ) {@Record = $cgi->param('array') ;};
# If string has a value, then do the following. If not,
# present the input form.
if ( $String ) {
Header() ;
print "The String is: $String
\n" ;
print "The Array has in it:
\n" ;
foreach ( @Record ) {
print "File: $_->{file}\n" ;
print "Item: $_->{item}\n" ;
} ;
print "We're done.....\n" ;
closeHTML() ;
# This is the input form.......
} else {
# Load up the array with some stuff....
$rec->{'file'} = "/usr/local/bin/myfile" ;
$rec->{'item'} = "type: file" ;
push ( @Record, $rec ) ;
$rec->{'file'} = "/usr/local/bin/ourfile" ;
$rec->{'item'} = "type: file" ;
push ( @Record, $rec ) ;
Header();
print "