|Keep It Simple, Stupid|
Re: Re: Scoping issue when sorting with subroutinesby broquaint (Abbot)
|on Apr 12, 2002 at 15:49 UTC ( #158614=note: print w/replies, xml )||Need Help??|
> Keep in mind that perl currently doesn't do nested subs
Ack, how un-DWIM!
But if we use a closure, all is well with the scope of $x
I was vaguely aware of the fact that nested subs in perl were broken (i.e scoped to current package, not current sub) and now I know the full extent (but I guess the logic should've followed really). Oh well, not much longer til Perl6 anyway ...
In Section Seekers of Perl Wisdom