Hi JandR
You're right, the Perl chdir command changes your current effective directory
but doesn't change what 'pwd' reports.
use Cwd;
is what you want. This provides its own 'cwd' and overloads 'chdir' to keep the
PWD environment variable (and, of course, the return from 'cwd') in sync.
HTH,
Rob
> -----Original Message-----
> From: THE SPENCERS [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 2001 14:29
> To: [EMAIL PROTECTED]
> Subject: RE: CHOIR
>
>
> Hello Team,
>
> Sorry for the confusion, but what I mean by drop off in is. If I
> run the a script from "/home/team/purl" and I choose from the menu
> "/home/brian/foy" I would like that to be my pwd from that point on until I
> choose another directory from the menu. I have not been able to get chdir()
> to do that for me. As stated before I can do anything I wish by using
> chdir(), but once I do a pwd I am still in the same directory as before.
>
> Regards,
>
> -----Original Message-----
> From: brian d foy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 11:50 PM
> To: [EMAIL PROTECTED]
> Subject: Re: CHDIR
>
>
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (The Spencers) wrote:
>
> > I know the command CD is a shell built-in and this may or may not be
> > where
> > my problem is. I have tried using the Function CHDIR and by using it I
> can
> > do anything inside a certain directory I wish except be drop off in it.
>
> what you mean by "drop off" in it? chdir() will change your working
> directory (or give you an error). what more do you need?
>
> --
> brian d foy <[EMAIL PROTECTED]> - Perl services for hire
> CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
> Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]