Re: Multiple File upload
- From: Tad J McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 23:03:07 GMT
vijay@xxxxxxxxxx <vijay@xxxxxxxxxx> wrote:
@files = 4;
That array has one element in it.
for(my $i=1;$i<=scalar(@$files);$i++){
Where have you defined $files?
You should always enable warnings and strict when developing Perl code:
use warnings;
use strict;
Assumming you meant @files instead of @$files, then the loop
will iterate 1 time, because that is what you told it to do.
If you want a loop that will iterate 4 times, then something
like this will do it:
foreach my $i ( 1 .. 4 )
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
.
- References:
- Multiple File upload
- From: vijay@xxxxxxxxxx
- Multiple File upload
- Prev by Date: Re: s/A/B/ and s/B/C/ but don't want A -> C
- Next by Date: Re: s/A/B/ and s/B/C/ but don't want A -> C (was: FAQ 6.4 I put a regular expression into $/ but it didn't work. What's wrong?)
- Previous by thread: Multiple File upload
- Next by thread: FAQ 5.14 How come when I open a file read-write it wipes it out?
- Index(es):
Relevant Pages
|