Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Find files and generate HTML list

by amitsandilya
on Jun 06, 2007 at 07:09 UTC ( #619543=perlquestion: print w/replies, xml ) Need Help??

amitsandilya has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Find files and generate HTML list
by planetscape (Chancellor) on Jun 06, 2007 at 07:27 UTC
Re: Find files and generate HTML list
by Tomte (Priest) on Jun 06, 2007 at 07:14 UTC

    Hmm - smells a bit like homework
    To get you started nonetheless:


    An intellectual is someone whose mind watches itself.
    -- Albert Camus

Re: Find files and generate HTML list
by robot_tourist (Hermit) on Jun 06, 2007 at 10:39 UTC

    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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://619543]
Approved by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2021-11-27 16:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found