Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: From tabbed text to html splitting the lines

by jettero (Monsignor)
on Aug 12, 2008 at 18:22 UTC ( #703940=note: print w/replies, xml ) Need Help??

in reply to From tabbed text to HTML splitting the lines

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: # 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>;


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://703940]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2018-01-22 00:57 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (230 votes). Check out past polls.