hello everyone.
my name is don doucette and I am 38 years old and have been involved with computers since the Timex Sinclair.


I have recently set up a server and am hosting a web site and forum for my community association.

I am running the YaBB forum (http://www.yabbforum.com/) and I would like to do the following...

I would like to use perl to look in a directory of numerical named .txt files (as in 0123456789.txt), find the file name with the largest number (as in 1234567890.txt is greater numerically than 0123456789.txt) then open the file and extract data from that file so it can be posted into a web page?

For instance...
I have a directory named Messages, in this directory there are the following files...


1108577587.txt
1108519222.txt
1108490078.txt
1108489912.txt

Obviously 1108577587.txt is greater numerically than the rest, this also happens to signify that this is the newest message. In this file is the following information...

Title of Post|Author|[EMAIL PROTECTED]|02/16/05 at 12:13:07|Group|xx|0|192.168.1.1|Message||

As you can see this file is delimited by | and ends with ||
I would like to parse out the Message field first then the Author field and assign their value to a variable then insert the variable into html on a page.


Something like...
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<p>Here is the newest post to the forum<BR><BR>
$Message <BR><br>
Posted by $author </p>
</body>
</html>

The idea is when the main web page loads it always shows the newest post to the forum and who posted it.

My question REALLY is do you think this can be easily done or is this a huge programming effort for someone just trying to figure out perl... I have been thumbing through my Perl book (The Complete Reference Perl Second Edition) but it hasn't really been helpful so far.

Thanks for your advice.



Reply via email to