Palm Optins wrote:
> Hi All,
>
> I writting a script so when members join my program it writes their  Email Address 
> into a
> flat file. I have it adding to the file this way.

It's better to do

    use Fcntl ':flock';

to get the names for the different lock vakues, then you can write:

> open (FILE, ">>$cgiroot/memdata/address/members.txt");
> flock(FILE, 2);

    flock FILE, LOCK_EX;

> print FILE "$list\n";
> flock(FILE, 8);

    flock FILE, LOCK_UN

> close (FILE);
>
> What I need to know, and I haven't been able to get it to work, is, How do I get it 
> to show
> one email address per line on a table in an HTML Page?

I think you want to read the text file and insert each line into a line of HTML?
If you can write HTML then you won't need me to tell you how to write a table,
so this just puts a line break after each line from the file. You also need an
HTTP Content Type header, the following will work:

You can do this:

{
    print "Content-Type: text/html\n\n";

    local @ARGV = $cgiroot/memdata/address/members.txt";
    while (<>) {
        chomp;
        print "$_<br>";
    }
}

If you're doing anything much more complicated you might like to
take a look at one of Perl's CGI modules which makes things a lot
easier.

Come back if there's anything else you need.

Rob



> ¤§¤=========¤§¤=========¤§¤¤§¤=========¤§¤=========¤§¤
>
> For God so loved the world, that He gave his only begotten
> Son, that whosoever believeth in him should not perish, but
> have everlasting life.
>
> ¤§¤=========¤§¤=========¤§¤¤§¤=========¤§¤=========¤§¤

Amen




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to