for ($i=0; $i < $lines1; $i++) { print "Name $i is $data_names[$i]"; open(FH, ""; @data = ; print "Data for $data_names[$i] is $data[$i]"; close (FH); } #### #!/usr/bin/perl -Tw ##################################### # Script by Joseph W. Guillaume # # Last updated June 2, 2005 # ##################################### use strict; use CGI qw(:standard); print "Content-Type: text/html\n\n"; print ''; ##################################### my $employee=param('employee_name'); my $certification=param('certification'); my $month=param('month'); my @month=""; my $day=param('day'); my $year=param('year'); my $mo_yr=param('mo_yr'); my @data; my @data_names; my $data_names; my $data; my $lines; my $lines1; my $number; my $i; my @mon = qw (January Feburary March April May June July August September October November December); ##################################### # Read Names.txt file # ##################################### open(JOE, "; #foreach (@data_names) { #close (JOE); #} print "Names are @data_names"; $lines1 =scalar@data_names; print "Number of records in Database is $lines1
"; ##################################### # Read File # ##################################### #print "Employee $employee "; for ($i=0; $i < $lines1; $i++) { print "Name $i is $data_names[$i]"; open(FH, ""; @data = ; print "Data for $data_names[$i] is $data[$i]"; close (FH); } ##################################### # Checking File # ##################################### $lines=scalar@data/5; if ($lines <= 0) { #print "has no records at this time."; print "
"; while ($lines >=1) { #for ($i=1; $i<=$lines; $i++) { $certification = shift(@data); print "Certification is $certification on "; my $number = shift (@data); $month = $mon [$number-1]; print "$month"; $day = shift (@data); print " $day,"; $year = shift(@data); print " $year"; $mo_yr = shift(@data); #print " $mo_yr"; print "
"; $lines--; } } ##################################### print '
To go Back
Click Here

'; print '