string concatenation and open()
CS Webmaster (webmast@cs.fsu.edu)
Wed, 12 Jul 2000 09:50:33 -0400 (EDT)
Hi, all,
I got a problem on string concatenation.
I am trying to create a unique file for each uploading file, so I try to
concatente $lastname with the $filename, where
$prefix=param('lname');
$filename=$prefix.$filename;
if(!open(OUTFILE,">>paper/$filename")){
print "ERROR: cannot open paper/$filename";
print STDERR "cannot open paper/$filename";
}
What I got is: paper/$filename cannot be created (without giving me error
message) as long as $prefix is param('something'), it will work if $prefix
is any other string even a random numer.
I do appreciate your help!
--Jin