On 12/18/07, Ravindra Ugaji <[EMAIL PROTECTED]> wrote:

> Hi Monks,

The Perl Monks are two doors down, on the left. But maybe we can help you here.

> I am trying the following code to change the directory
>
> chdir ( '/opt/application') || die ("Can't change directory: $!\n");

> But i am unable to change the directory to " /opt/application " from
> present working directory

Do you get an error message? What does it say?

If there is no error message, perhaps you mean that, after the program
has finished running, you find that the shell is still using the
original working directory. That's a feature of your operating system,
not a bug. You can't change the working directory of another program
without that program's knowledge and consent, else programs would
unexpectedly find themselves working in the wrong directories and
wreaking havoc. This is covered in the Unix FAQ, question 2.8, among
other places; but the answer is about the same in principle on any
other OS.

    http://www.faqs.org/faqs/unix-faq/faq/part2/
    http://packetstormsecurity.org/unix-humor/awesome.unix.chdir.program.html

Check the documentation for your shell program, too, because it may
have a suggestion on how you can do what you want.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to