#!/usr/bin/perl -Tw use strict; use CGI qw(:standard); print "Content-Type: text/html\n\n"; print '<body bgcolor="cccccc">'; ##################################### my $employee=param('employee_name'); my $certification=param('certification'); my $month=param('month'); my @month=""; my $day=param('day'); my $year=param('year'); my $key=""; my $i=""; my $t=""; my @data=""; my $items; my $lines; my $number; my @mon = qw (January Feburary March April May June July August Septem +ber October November December); ##################################### # Read File # ##################################### print "Employees name is <b> $employee </b><p\/><hr><p\/>"; open(JOE, "<Files/$employee.txt"); @data = <JOE>; close (JOE); ##################################### # Print File # ##################################### $lines=scalar@data/4; for ($i=1; $i<=$lines; $i++) { $certification = shift(@data); print "Certification is $certification on "; $number = shift (@data); $month = $mon [$number-1]; print "$month"; $day = shift (@data); print " $day"; $year = shift(@data); print " $year"; print "<p\/><HR>"; } ##################################### print '<div align="center"><table width="120" border="1" cellspacing=" +2" cellpadding="0"><tr><td align="center">To go Back</td></tr><tr><td + align="center"><a href="http://hawaiicivilmarriage.com/FFD/">Click H +ere</a></td></tr></table><p></p></div>'; print '</body'; ##################################### exit;
In reply to Change number into month by loop362
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |