in reply to Re^3: Testing the current directory with Cwd and File::Spec
in thread Testing the current directory with Cwd and File::Spec
xdg,
To your first comment, I agree that my reply about saving the filehandle instead of the name doesn't address the meditation you were actually pondering. It's more of a comment on my ideal of a cwd save and restore should work in general.
To your second comment, I agree that the way it works within the framework of existing lexical scoping rules makes it nice and convenient.
For tempd, it's too bad we can actually create an anonymous directory for this purpose (i.e. create it, change into it, and delete it while still being inside it). (Or even if there are some operating systems permit this, it's certainly not portable).
|
|---|