loop362 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -Tw use strict; use CGI qw(:standard); print "Content-Type: text/html\n\n"; ##################################### my $employee=param('employee_name'); my $i=""; my $t=""; my @data=""; my $items; my $lines; ##################################### # Read File # ##################################### print "Employee's name is: $employee<p\/>"; open(JOE, "<Files/$employee.txt"); @data = <JOE>; close (JOE); ##################################### # Print File # ##################################### $lines=scalar@data/4; for ($t=1; $t<=$lines; $t++) { for ($i=1; $i<=4; $i++) { $items=shift(@data); print $items; } print "there is a line break here<p\/>"; } ##################################### print "<p\/>To go Back <A HREF=\"http://127.0.0.1/\">Click here</A>"; ##################################### exit;
20050518 Janitored by Corion: Put code in code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array manipulation
by davido (Cardinal) on May 18, 2005 at 21:49 UTC | |
|
Re: Array manipulation
by scmason (Monk) on May 18, 2005 at 22:23 UTC | |
|
Re: Array manipulation
by TheStudent (Scribe) on May 19, 2005 at 00:24 UTC | |
by wfsp (Abbot) on May 19, 2005 at 08:31 UTC | |
by loop362 (Pilgrim) on May 19, 2005 at 01:38 UTC | |
by scmason (Monk) on May 19, 2005 at 16:36 UTC |