britney has asked for the wisdom of the Perl Monks concerning the following question:
open (DATA,"PAD.txt") || die ("Can't Open data File \n"); @data=<DATA>; close DATA; &header_response; $x=0; foreach $line (@data) { $x++; ($Router, $itemgroup, $itemid, $SFC, $LogOp, $timestamp, $ncdescr +iption, $nccode, $operator, $comment1, $comment2)=split(/\|/,$line); if (($comment1 =~ " ") && ($comment2 =~ " ")) { print "<TR><TD>$x</TD><TD>$Router</TD><TD>$itemgroup</TD><TD>$item +id</TD><TD>$SFC</TD><TD>$LogOp</TD><TD>$timestamp</TD><TD>$ncdescript +ion</TD><TD>$nccode</TD><TD>$operator</TD><TD>n/a</TD><TD>n/a</TD></T +R> \n"; } elsif (($comment1 != " ") && ($comment2 =~ " ")) { print "<TR><TD>$x</TD><TD>$Router</TD><TD>$itemgroup</TD><TD>$itemid</ +TD><TD>$SFC</TD><TD>$LogOp</TD><TD>$timestamp</TD><TD>$ncdescription< +/TD><TD>$nccode</TD><TD>$operator</TD><TD>$comment1</TD><TD>n/a</TD>< +/TR> \n"; } else { print "<TR><TD>$x</TD><TD>$Router</TD><TD>$itemgroup</TD><TD>$itemid</ +TD><TD>$SFC</TD><TD>$LogOp</TD><TD>$timestamp</TD><TD>$ncdescription< +/TD><TD>$nccode</TD><TD>$operator</TD><TD>$comment1</TD><TD>$comment2 +</TD></TR> \n"; } } &footer_response;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help ! New in perl and cgi
by Marza (Vicar) on May 21, 2002 at 20:13 UTC | |
by britney (Acolyte) on May 22, 2002 at 05:24 UTC | |
by abstracts (Hermit) on May 22, 2002 at 06:00 UTC | |
|
Re: Help ! New in perl and cgi
by UberDragon13 (Acolyte) on May 22, 2002 at 02:51 UTC |