" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 4:54 PM
Subject: Re: problems with scalar(@array)
> my final goal is to loop through each filename and count how many times
each filename appears, example:
> archive/summer.html 2
> arts.
close IN;
}
#end get_data
HTH,
Rob
- Original Message -
From: "Pam Derks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 4:54 PM
Subject: Re: problems with scalar(@array)
> my final goal is to loop through each filename
]
> Subject: Re: problems with scalar(@array)
>
>
> > my final goal is to loop through each filename and count how many
> > times each filename appears, example: archive/summer.html 2
> arts.html
> > 2 arttherapy.html 3.
> >
> >
> > for right now,
> my final goal is to loop through each filename and count how many times
> each filename appears, example: archive/summer.html 2
> arts.html 2
> arttherapy.html 3.
>
>
> for right now, I'm just trying to loop through the array @url.
> Next step would be to compare whats in $line with what's in $ur
>> On Tue, 17 Dec 2002 11:59:46, <[EMAIL PROTECTED]> said:
> Also, you might change 'scalar(@url)' to '$#url' for simplicity.
More than just simplicity:
void:chris~ % perl -le '@a=(5,10,15,20); print scalar @a,"\n",$#a'
4
3
$# signifies the index of the last element in an arr
ou want?
Cheers,
Rob
- Original Message -----
From: "Pam Derks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 2:50 PM
Subject: problems with scalar(@array)
> Howdy,
>
> why isn't $i incrementing?
>
> here's sampl
> Howdy,
>
> why isn't $i incrementing?
> >24for ($i=0; $i<$num; $i++){
>25 print ("$i = $url[$i]\n");
>26}
>27
It's working perfectly! :)
21$num = scalar(@url);
22print ("num = $num\n");
output:
num = 1
0 = archive
- Original Message -
From: "Pam Derks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 2:50 PM
Subject: problems with scalar(@array)
> Howdy,
>
> why isn't $i incrementing?
>
> here's sample of data file containing
Derks [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 9:51 AM
> To: [EMAIL PROTECTED]
> Subject: problems with scalar(@array)
>
>
> Howdy,
>
> why isn't $i incrementing?
>
> here's sample of data file containing date and filename:
> 021211
Howdy,
why isn't $i incrementing?
here's sample of data file containing date and filename:
021211 archive/summer.html
021211 archive/summer.html
021211 archive/tipsheet.html
021211 arts.html
021211 arts.html
021211 arttherapy.html
021211 arttherapy.html
021211 arttherapy.html
021211 award.html
02
10 matches
Mail list logo