Hello Dear Monks
I have this form :
<FORM ACTION="/hs/scripts/test1.pl" METHOD="post" ENCTYPE="multipart/f +orm-data"> Photo to Upload: <INPUT TYPE="file" NAME="pic1"> <br><br> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form"> </FORM>
and the script :
#!/usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw/fatalsToBrowser/; use Storable; my %db; my $query = new CGI; my $dbfile = "C:/Program Files (x86)/Abyss Web Server/htdocs/hs/script +s/db1"; print "Content-type: text/html\n\n"; my $var = $query->param("pic1"); print $var . "<br>"; # my @TMP1 = split ( // , $var); # $var = join ( "" , @TMP1); $db{"1"}{"pic1"} = $var; store \%db, $dbfile ;
which produces
pic.jpg Software error: Can't store GLOB items at ..\..\lib\Storable.pm (autosplit into ..\..\ +lib\auto\Storable\_store.al) line 215, at test1.pl line 25 For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error.
if I uncomment
# my @TMP1 = split ( // , $var); # $var = join ( "" , @TMP1);
it works
But I have no idea why !
Thanks
Have a nice day.
In reply to CGI and Storable : explain me this, please. by lepetitalbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |