Re: passing global variable by reference?
From: Don S (dshesnicky_at_yahoo.com)
Date: 02/22/04
- Previous message: Tassilo v. Parseval: "Re: Error with Gtk-Perl-0.7009"
- In reply to: thumb_42_at_yahoo.com: "Re: passing global variable by reference?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Feb 2004 06:56:12 -0800
> I believe this may be your problem:
>
> my($path,$$level,$sub,$d_flag,$f_flag,$l_flag) = @_;
>
> If you change it to:
>
> my($path,$level,$sub,$d_flag,$f_flag,$l_flag) = @_;
>
> and do a $$level--;
>
That pretty much seemed to work, should have tried
a couple of more permutations to stumble on it :)
documentation/smockumentation. Relevant code is:
sub tree_walk {
my($level,$path,$sub,$d_flag,$f_flag,$l_flag) = @_;
<snip>
$$level++;
&tree_walk($level,$newpath,$sub,$d_flag,$f_flag,$l_flag);
$level--;
<snip>
}
I would have thought I needed a $$level or \$level when
I recursively called tree_walk but I guess it makes sense
that you have a pointer like object and once it's set you
only need to dereference it when used via $$.
Don
- Previous message: Tassilo v. Parseval: "Re: Error with Gtk-Perl-0.7009"
- In reply to: thumb_42_at_yahoo.com: "Re: passing global variable by reference?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|