Rob Cottingham wrote:
> I'm trying to use a parameter passed from a CGI form as the basis of a
> filename:
>
> my $file_location = "/home2/samuel-c/HTML/alex/urltest/";
> my $filename=param('category');
> my $fileid=$file_location.'urls_'.$filename;
>
> open(ULL, ">>$fileid") || die "Can't open the URL file: $! \n";
>
> Doesn't work worth a damn. (The "category" parameter is a keyword, like
> "intro".) But if I use this line instead to define $fileid...
>
> my $fileid="/home2/samuel-c/HTML/alex/urltest/urls_intro;
>
> ...then it works like a charm. I've also tried this with a keyword read in
> from a text file; that didn't work either. Any suggestions?
where does it fail? do you get a reason from $! if it dies at the open?
also, you may want to try this:
use Data::Dumper;
my $file_location = "/home2/samuel-c/HTML/alex/urltest/";
my $filename=param('category');
my $fileid=$file_location.'urls_'.$filename;
warn "fileid: ", Dumper($fileid);
and see what the value of $fileid is.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]