Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use Cwd; my $new_dir = "/usr/bin"; my $dir; my $original_dir = getcwd; print "$original_dir\n"; chdir($new_dir); $dir = getcwd; print "$dir\n"; chdir($original_dir); $dir = getcwd; print "$dir\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best way to change directories for a script?
by Util (Priest) on Aug 22, 2005 at 05:10 UTC | |
|
Re: Best way to change directories for a script?
by tilly (Archbishop) on Aug 22, 2005 at 06:44 UTC | |
|
Re: Best way to change directories for a script?
by xdg (Monsignor) on Aug 22, 2005 at 10:51 UTC |