for some reason when, I do this it doesnt print any
thing, it just makes the file.
sub uploadfile {
for ($i=1; $i<=5; $i++) {
if ($q->param("file$i")) {
$filename = $q->param("file$i");
$file = $q->param("file$i");
$filename =~ s/.*[\/\\]//;
open (FILE,">$us
True. The only print statement I see here is the one
which prints the contents of $uploaded to FILE. Maybe
after you do this, you want to either print out an
HTML response or redirect to another page? If so, you
need to write more code to do that.
- John
--- LinkS On WeB <[EMAIL PROTECTED]> wrot
Oh! Upon re-reading I realize you probably meant that
nothing is printed to the file, you are just getting
an empty file created. Sorry for misunderstanding.
Unfortunately, I don't have any experience in
uploading files, so I'm sure that others on this list
can be of more help than I can. (In fac
Links On Web wrote at Fri, 14 Jun 2002 07:20:17 +0200:
> for some reason when, I do this it doesnt print any thing, it just makes the file.
>
> sub uploadfile {
> for ($i=1; $i<=5; $i++) {
> if ($q->param("file$i")) {
> $filename = $q->param("file$i");
> $file = $q->param("
--- Janek Schleicher <[EMAIL PROTECTED]> wrote:
> I'm also not an expert of uploading files.
> But you do two things to read the file:
>
> $file = $q->param("file$i");
> Now $file contains a string.
>
> Then you use something like
> my $uploaded = <$file>;
>
> So now you use $file as a Filehand
Crud! This is what I get for typing a program directly into a browser window :)
> for ( 1 .. 5 ) {
> if ( my $file = $q->param( "file$_" ) {
> my $filename = basename( $file );
> open FILE, "> $user->{'site_id'}/$filename" or error(...);
>
Ovid wrote at Fri, 14 Jun 2002 16:43:51 +0200:
> It would seem that way, but this is not the case. From the CGI.pm documentation:
>
> When the form is processed, you can retrieve the entered filename by calling
>param():
>
>$filename = $query->param('uploaded_file');
>
> [
Split takes a text delimited file like:
data1|data2|data3|data4
and splits on the delimiter (in this case the pipe character). I'm
not sure how it works with a database but assume it's similar.
>Can someone explain to me what the purpose of split is? I am assuming you
>can take like a text
Hi all,
I know how to check if a link is valid, using LWP module and head($link) but
I have a problem.
Lets say that in the page that I want to check I have some links that point
to a cgi script that will output the file something like:
http://server.domain.com/cgi-bin/download.pl?file=1234";>Do
Hi all,
I know that if I will put the lines from a file in an array, I can sort that
array, but if the file is too big, this is not possible because it will eat
my whole memory.
Do I have another solution for sorting the lines from a file if the file is
very big?
Thank you.
Teddy,
[EMAIL PROTE
Hi all,
Please tell me what does this error mean:
Reversed <= operator at F:/teddy/cgi-bin/check_link.pl line 64.
Unterminated <> operator at F:/teddy/cgi-bin/check_link.pl line 64.
That line contains:
if ($times > $min && $times <= $max) {
I've put 110 for $min and 200 for $max, but there are
11 matches
Mail list logo