D
\Dandy\ Randy
Hi,
As per my previous posts, I am searching for a way to open a text file that
contains a few paragraphs of text, locate web URL's and replace them with
the needed html tags such as <a href & </a> etc. Most of the responses
suggested using a perl module ... URI::Find and similair methods.
Unfortunately, the hosting company I run my scripts from does not have this
module installed, and they are not prepared to install it just for my needs.
I also cannot change hosting companies.
So ... is there ANY other way my goal can be accomplished giving I cannot
use URI::Find? Here is an example of theoretical code:
#!/usr/bin/perl
# get text file data
open (TEXT, "<data/data.txt") or die "Can't open file: $!";
@data=<TEXT>;
close(TEXT);
# find web URL's and replace occurances with needed HTML tags
scan @list > replace;
# write the changed data back to the text file
open (TEXT, ">data/data.txt") or die "Can't open file: $!";
print DATA @text;
close(TEXT);
Please, it is very important to me to find this solution, if you have any
ideas, post back. Working code examples are very welcomed. Thanx everyone!
Randy
As per my previous posts, I am searching for a way to open a text file that
contains a few paragraphs of text, locate web URL's and replace them with
the needed html tags such as <a href & </a> etc. Most of the responses
suggested using a perl module ... URI::Find and similair methods.
Unfortunately, the hosting company I run my scripts from does not have this
module installed, and they are not prepared to install it just for my needs.
I also cannot change hosting companies.
So ... is there ANY other way my goal can be accomplished giving I cannot
use URI::Find? Here is an example of theoretical code:
#!/usr/bin/perl
# get text file data
open (TEXT, "<data/data.txt") or die "Can't open file: $!";
@data=<TEXT>;
close(TEXT);
# find web URL's and replace occurances with needed HTML tags
scan @list > replace;
# write the changed data back to the text file
open (TEXT, ">data/data.txt") or die "Can't open file: $!";
print DATA @text;
close(TEXT);
Please, it is very important to me to find this solution, if you have any
ideas, post back. Working code examples are very welcomed. Thanx everyone!
Randy