qq has asked for the wisdom of the Perl Monks concerning the following question:
An easy, somewhat OT question, but I don't know where to look for an answer. I want to write something like:
#/usr/bin/perl `cd somedir`;
And have it act as though I typed it into the shell when I run the script. How does one do this? (And where should I have looked to find the answer?)
ie:
/> perl cd_script.pl /somedir/>
thanks, qq
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: shell cd within perl script
by Abigail-II (Bishop) on Apr 19, 2004 at 13:58 UTC | |
|
Re: shell cd within perl script
by Fletch (Bishop) on Apr 19, 2004 at 13:12 UTC | |
by qq (Hermit) on Apr 19, 2004 at 13:39 UTC | |
by Roy Johnson (Monsignor) on Apr 19, 2004 at 15:19 UTC | |
by sgifford (Prior) on Apr 19, 2004 at 15:50 UTC | |
by qq (Hermit) on Apr 20, 2004 at 11:44 UTC | |
|
Re: shell cd within perl script
by guha (Priest) on Apr 19, 2004 at 13:41 UTC | |
|
Re: shell cd within perl script
by BUU (Prior) on Apr 19, 2004 at 13:25 UTC | |
by ishnid (Monk) on Apr 19, 2004 at 13:38 UTC | |
|
Re: shell cd within perl script
by coreolyn (Parson) on Apr 20, 2004 at 14:46 UTC |