in reply to Perl to upload blob file to Mysql

Hi,

It's not about the BLOB, is about code...

You can make the same effect but without using the while loop.

my $filedata; { local $/; open TARFILE, "$domain_path/$file_name"; $filedata = <TARFILE>; close TARFILE; }

Concerning BLOB and DB, take a look at the links posted before.

Ahh, and next time, use something like $host, $user, $password. ;-) So you don't get the surprise!

Regards,

|fire| at irc.freenode.net

Replies are listed 'Best First'.
Re^2: Perl to upload blob file to Mysql
by xspikx (Acolyte) on Aug 29, 2005 at 18:42 UTC
    oh god. tell me i didn't put the pass in the code. ahh... i'm gonna kill myself now. :(
Re^2: Perl to upload blob file to Mysql
by blazar (Canon) on Aug 31, 2005 at 09:39 UTC
    Only a cosmetic suggestion:
    my $filedata = do { local $/; open my $tarfile, '<:raw', "$domain_path/$file_name" or die $!; # this particular line not that cosmetic... <$tarfile>; };