Hi,
Thank you in advance for your help.
I am new to PERL, just a couple of days, but reading a lot. I found your site very exciting and informative.
I am trying to read a text file with a key 10 to 120 numbers in a single lime into an array. But I am getting a 500 error and do't know exactly what is the error. I am confused on how to make the code read from my web server (the path).
Perhaps my approach is incorrect!.
my code is as follows:
Thanks again
Tony
Thank you in advance for your help.
I am new to PERL, just a couple of days, but reading a lot. I found your site very exciting and informative.
I am trying to read a text file with a key 10 to 120 numbers in a single lime into an array. But I am getting a 500 error and do't know exactly what is the error. I am confused on how to make the code read from my web server (the path).
Perhaps my approach is incorrect!.
my code is as follows:
Code:
#!/usr/bin/perl -w
# readtext.pl
use strict;
use CGI ':standard';
$filename = "//mypage.com/key.txt";
open (filename) || die "Couldn't open $filename: $!n";
my @params=<filename>;
print
header(),
start_html(
-title => 'Welcome!',
-text => '#520063'
),
h1("the key is: $@params"),
end_html();
]
Tony
Comment