Sscotties
08-22-2002, 12:08 PM
#!/usr/bin/perl
# HOW DO I DO THIS ?:
# open up a local *.txt file (eg. in 'cgi-bin')
# get the value of an integer there
# increment it by 1 in the external file and
# assign the variable $i the new value
# THEREFORE ...
# reading page1.txt, page2.txt, page3 etc,
$address = "/public_html/page+$i+.txt";
open(OUT, ">$address");
print "content-type: text/plain\n\n";
while (<>) {
print OUT $_;
print $_;
}
close (OUT);
exit 0;
# HOW DO I DO THIS ?:
# open up a local *.txt file (eg. in 'cgi-bin')
# get the value of an integer there
# increment it by 1 in the external file and
# assign the variable $i the new value
# THEREFORE ...
# reading page1.txt, page2.txt, page3 etc,
$address = "/public_html/page+$i+.txt";
open(OUT, ">$address");
print "content-type: text/plain\n\n";
while (<>) {
print OUT $_;
print $_;
}
close (OUT);
exit 0;