sathya_myl has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to download a zip file using the below code.
open FROM, "<$file_name"; my $blksize = (stat FROM)[11] || 4096; my $buf; while (sysread FROM, $buf, 4096) { print $buf; } close FROM;
We have an option to lock the page(using javascript) when any process happen with in the page. Whenever i download using the above code, the page doesn't unlock or not executing javascript. I even tried other download options like printing the handler like print <FROM>, it's also creating the same problem.
My simple understading is that whenever i use a print command like print $buf or print <FROM>, it's creating the problem. Correct if i'm wrong.
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File download using mod perl
by Corion (Patriarch) on May 18, 2012 at 14:01 UTC | |
by sathya_myl (Acolyte) on May 18, 2012 at 14:19 UTC | |
by Corion (Patriarch) on May 18, 2012 at 14:24 UTC | |
by sathya_myl (Acolyte) on May 18, 2012 at 14:30 UTC | |
by Corion (Patriarch) on May 18, 2012 at 14:41 UTC |