lakeTrout has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); open(OUTFILE, ">results.html") or die "Can't write to result.html: $!\ +n"; print OUTFILE "<html><head>"; print OUTFILE "<title>Results: External</title>"; print OUTFILE "</head>"; print OUTFILE "<body>"; print OUTFILE "<table border='1'>"; print OUTFILE "<tr class='light'>"; print OUTFILE "<td>1</td>"; print OUTFILE "<td>2</td>"; print OUTFILE "<td>3</td>"; print OUTFILE "<td>4</td>"; print OUTFILE "</tr>"; open (DB,"ext.log") or die("There was a problem opening the file."); while ($entry=<DB>) { @fields=split(/ /,$entry); print OUTFILE "<tr>"; print OUTFILE "<td><a href=\"/path/to/form.html">Edit Record</a></td>" +; print OUTFILE "<td>$fields[0]</td>"; print OUTFILE "<td>$fields[1]</td>"; print OUTFILE "<td>$fields[2]</td>"; print OUTFILE "<td>$fields[3]</td>"; print OUTFILE "</tr>"; } close DB; print OUTFILE "</table>"; print OUTFILE "</body>"; print OUTFILE "</html>"; close OUTFILE;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: delete/over-write record in FlatFile
by samtregar (Abbot) on Mar 25, 2008 at 21:32 UTC | |
by lakeTrout (Scribe) on Mar 25, 2008 at 21:43 UTC | |
by chromatic (Archbishop) on Mar 25, 2008 at 22:50 UTC | |
by samtregar (Abbot) on Mar 25, 2008 at 23:28 UTC | |
When can you not afford a free tool?
by doc_faustroll (Scribe) on Mar 26, 2008 at 02:31 UTC | |
by lakeTrout (Scribe) on Mar 26, 2008 at 23:28 UTC |