Loading ...
Sorry, an error occurred while loading the content.
 

Re: Moving between directories

Expand Messages
  • Damien Carbery
    ... chdir( $ENV{ HOME } ); This is a perfect example (albiet unusually unique) where using external programs when an equivalent perl function exists is bad.
    Message 1 of 2 , Jun 30, 2003
      --- In perl-beginner@yahoogroups.com, "T.S. Ravi Shankar"
      <Ravi.Shankar@s...> wrote:
      > Hi all :
      >
      > Could anyone tell me how I could move between the directories ( or
      > change the present working directory ) with any perl command ??
      >
      > I have tried these system '/bin/cd $HOME'; , chdir '$HOME'; ,
      > exec 'cd $HOME';
      >
      > After I execute the perl code, the PWD still remains unchanged.
      >
      > If the above ways are incorrect, please direct me to the correct.
      >
      > Thanks,
      > Ravi

      chdir( $ENV{'HOME'} );

      This is a perfect example (albiet unusually unique) where using
      external programs when an equivalent perl function exists is bad.
    Your message has been successfully submitted and would be delivered to recipients shortly.