lepetitalbert has asked for the wisdom of the Perl Monks concerning the following question:
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.
"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI and Storable : explain me this, please.
by aufflick (Deacon) on Apr 27, 2006 at 01:58 UTC | |
by davidrw (Prior) on Apr 27, 2006 at 02:17 UTC | |
Re: CGI and Storable : explain me this, please.
by rhesa (Vicar) on Apr 27, 2006 at 02:37 UTC | |
by lepetitalbert (Abbot) on Apr 27, 2006 at 02:57 UTC | |
by davidrw (Prior) on Apr 27, 2006 at 04:31 UTC | |
by chromatic (Archbishop) on Apr 27, 2006 at 06:20 UTC | |
by davidrw (Prior) on Apr 27, 2006 at 13:34 UTC | |
by chromatic (Archbishop) on Apr 27, 2006 at 15:43 UTC |
Back to
Seekers of Perl Wisdom