The subroutine call with parameters eliminates a capability of not deliberate change of a variable. Such change can result in an error, specially with large volume of code.
I like use two Perl pragmas:
use strict;
use vars qw($global_variable_1 $global_variable_2 $global_variable_n);
This...
Hi!
I want start file download dialog after user was click on "Download" button on my http site. File is stored on another ftp server.
I seem, it is standatd output?
Hi! Please help.
How I can download file from ftp server via browser. I try use code below, but it not download file. it print file in browser.
-----------------------------------------------------------
print "Content-type: file\n\n";# I seem this is wrong?
eval {
use Net::FTP...
I try writing "pseudo relation" database module and planning use DB_File for easy index creation and access. But with DB_File my index files sizes will be larger as tables :-)
When I start writing this project, I was use MLDBM module for this, and my code was worked exselent quick...
For example I make loop:
tie %h, "DB_File", $file, O_RDWR|O_CREAT, 0640, $DB_HASH or die "Cannot open file $file: $!\n";
for($i = 0;$i < 10;$i++) {
$h{$i} = 'value';
}
untie %h;
Result file is 40 kb. I think, it is too large :-(
Hi!
Known anyone, how I can modify tied file size. I need save to db file small values (for example: key - 10 char, value - 30 char), but file is very large, approx 8kb empty and it quick enlarging...
Hi, guys!
Please, help.
I write script that use DBI for connecting to Mysql, but I have error:
*
(98)Address already in use: make_sock: could not bind to port 80
DBI->connect(mail_list:localhost:3306) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)...
Hi!
I am newbie to Linux. After installation and reboot, Linux load is starting. It successfully until Xwindow is loaded. After this, my display is switch off and computer not responding.:-(
Please help!
Hi!
I use apache(win32) for Perl scripts testing on my desktop. If I try upload image wia file field, my image is crashed (look as uploaded in ascii mode). How I can switch of auto encoding for image files? :-)
Hi!
Thank for your answers. I too think, this is result of loading image in ascii. The string: binmode OUTFILE; does not help. I know, that the apache change encoding for the transmitted information and it can give such outcome. It is possible switch off it for definite types of files or to...
Hi!
I try upload image to server via form. I take working code, make some modifications, and try use it on my desktop (Win98, Apache for Win)>:-( You can see it here:
Code sample is below:
-----------------------------------------------------
my $im_file = $co->param("img_$no")...
Hi!<br>Iwrite CGI for my images portfolio. This is my first "serious" script, and I need anyone, who can help me.:-)<br>I modified parse_template subroutine(by Matt Wright, CGI/Perl coocbook) for returning parsed txt file in program, and using it as easy customizable page<br>parts...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.