in reply to 'finally' block in Perl?
tie $cwd => 'main'; # the example ties in package main { local $cwd = '/some/other/directory'; # execute in /some/other/directory } # resume in original working directory
This technique will obviously work for other ties too; it is probably more appropriate when initialisation and finalisations are such paired opposites.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 'finally' block in Perl?
by John M. Dlugosz (Monsignor) on Jul 22, 2001 at 11:13 UTC |