On Wed, May 30, 2001 at 04:41:13PM -0700, John Milardovic wrote:
> for $var (@files)
> {
> print "$count++\t$var\n";
> }
I hope you weren't expecting $count to be incremented there. ++ is not
interpolated.
Did you mean:
for $var (@files)
{
print $count++, "\t$var\n";
}
Or ...
for $var (@files)
{
print "$count++\t$var\n";
}
HTH
John
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
On Wed, May 30, 2001 at 04:00:53PM -0700, Steve Best wrote:
> But when I went to go print the elements of the array:
>
> sub print_array {
>my($count) = 0;
>print "Printing array...\n";
>while (@files) {
> print "$count\t$files[$count]\n";
> $count++;
>};
> };
>
>
e
-Original Message-
From: Peter Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 3:53 PM
To: Steve Best; [EMAIL PROTECTED]
Subject: Re: Help recursing directories and java mod question
At 03:44 PM 5/30/01 -0700, Steve Best wrote:
>Howdy, I used to do a bit of Perl programm
At 03:44 PM 5/30/01 -0700, Steve Best wrote:
>Howdy, I used to do a bit of Perl programming but its all washed away
>through disuse. Sooo, I need to write a subroutine that will recurse from a
>parent directory through all children directories, performing an action on
>files that match a pattern,
Howdy, I used to do a bit of Perl programming but its all washed away
through disuse. Sooo, I need to write a subroutine that will recurse from a
parent directory through all children directories, performing an action on
files that match a pattern, in this case *.class. I have the Perl cookbook,