Hello,
I need to open a directory (linkfiles) and open a series of text files within the directory and print the content of each file one by one in the browser.
Here is what I have so far:
opendir (DIR, "linkfiles");
@files = grep { /.txt/ } readdir(DIR);
close (DIR);
$count = 0;
foreach $txt(@files) {
$count++;
open(DATA,"linkfiles");
@files = <DATA>;
close(DATA);
#how do you I print the content of a file???
}
thanks in advance.
I need to open a directory (linkfiles) and open a series of text files within the directory and print the content of each file one by one in the browser.
Here is what I have so far:
opendir (DIR, "linkfiles");
@files = grep { /.txt/ } readdir(DIR);
close (DIR);
$count = 0;
foreach $txt(@files) {
$count++;
open(DATA,"linkfiles");
@files = <DATA>;
close(DATA);
#how do you I print the content of a file???
}
thanks in advance.