in reply to local scoped cwd
that defined $_[1] is necessary becuase local seems to undef the variable at some point (otherwise resulting in a chdir to $HOME).use Cwd; sub TIESCALAR {bless {} => shift} sub FETCH {cwd} sub STORE {defined $_[1] and (chdir $_[1] or die $!)} our $cwd; tie $cwd => __PACKAGE__;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: local scoped cwd
by bikeNomad (Priest) on Jun 28, 2001 at 05:31 UTC | |
by Anonymous Monk on Jun 28, 2001 at 07:42 UTC |