Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to do what I mean:
The semantics being:
if ($foo) { local $cwd = ".."; /* current working directory changes */ ... } /* cwd is back to original directory */
The semantics being:
if ($foo) { my $old_cwd = cwd; chdir ".."; ... chdir $old_cwd; }
Back to
Seekers of Perl Wisdom