in reply to Re: Directory recursion on win32
in thread Directory recursion on win32

Ahh, okay that has gained me an extra level of recursion. Can i get confirmation that $PWD will take on the new pwd on each recursion not, maintain the previous value? (i'm not fully understanding the practical differences between $def, my $def, and my ($def) )

Replies are listed 'Best First'.
Re: Re: Re: Directory recursion on win32
by fglock (Vicar) on Aug 04, 2003 at 16:32 UTC
    sub Recurse { my ($PWD) = @_;

    This makes $PWD exist only during this call to this block. Recurrent calls will create new versions of $PWD.

    The parenthesis make a list, and $PWD is the first value. This list gets aliased to the values in the @_ list, such that $PWD = $_[0].