Just in case anyone would like to see it and safe the 4,000 clicks through sourceforge, and unpacking the zip file... update: this made more sense before it was reparented from a dup-node that did not have the sources in it.
#!c:/Perl/bin/Perl.exe
#
# this code was put in the public domain here:
# http://sourceforge.net/projects/dataoniphone/ V 0.9.0 04/08/2008 17:
+01:00
open (INFILEHANDLE, "<table.txt") or die "error opening";
open (OUTFILEHANDLE, ">table.html") or die "error opening";
while (<INFILEHANDLE>) {
chomp;
if ($_ eq "") {
print OUTFILEHANDLE "<B><\/B><BR>\n\n<HR>\n"; # was an empty lin
+e
} else {
s/\t/ /; #join 1st & 2nd field (comment this if undesired)
s/\t/ <\/B><BR>\n/; # 1st fields will be bold so we have a <\/
+B>
s/\t/ <BR>\n/g; # remaining fields will end with <BR>
print OUTFILEHANDLE "<B> $_ <BR>\n<HR>\n"; # record separator wi
+ll be <HR>
}
}
close INFILEHANDLE;
close OUTFILEHANDLE;
print "\nFile table.html created (press a key)\n";
$line = <STDIN>;
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|