#!/usr/bin/perl
$^W=1;
use CGI;
$| = 1;
print "Content-type: text/html\n";
print "Hello, World!\n";
open ($in, "<", "source.list") or die "can't open file: $!";
@src_name = grep /^[A-B]/, <$in>;
close $in;
print $src_name[0];
print $src_name[$#argument];
####
#./test2.pl
Content-type: text/html
Hello, World!
A02008P2350
BSW30905
####
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
can't open file: No such file or directory at /srv/www/csodb/test2.pl line 7. ,
If you think this is a server error, please contact the webmaster.
Error 500
lapakahi
Thu Oct 28 10:24:57 2010
Apache/2.2.0 (SuSE)