Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Find files and generate HTML list

by robot_tourist (Hermit)
on Jun 06, 2007 at 10:39 UTC ( #619569=note: print w/ replies, xml ) Need Help??


in reply to Find files and generate HTML list

To be really clever: (unless you have more concrete requirements about your html file) *untested*

use strict; my $fh; my $file_name = "/path/to/resultfile.txt"; open($fh, '<', $file_name) or die ("couldn't open $filename"); my $fh2; my $html_file = "/path/to/htmlfile.html"; open($fh2, '>', $html_file) or die ("couldn't open $html_file"); print $fh2 "<html><head><title>Results</title></head><body>"; while (<$fh>) { print $fh2 "<p>$_</p>"; } print $fh2 "</body></html>"; close $fh; close $fh2;

How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist.
Robot Tourist, by Ten Benson


Comment on Re: Find files and generate HTML list
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://619569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-07-23 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (154 votes), past polls