in reply to Re: How could you make a script think it's running in its own directory?
in thread How could you make a script think it's running in its own directory?

__FILE__?
  • Comment on Re^2: How could you make a script think it's running in its own directory?

Replies are listed 'Best First'.
Re^3: How could you make a script think it's running in its own directory?
by why_bird (Pilgrim) on Mar 27, 2008 at 10:06 UTC
    How does __FILE__ help? Would you use it with chdir?
    ........
    Those are my principles. If you don't like them I have others.
    -- Groucho Marx
    .......

      Just Try It ...

      use File::Basename qw/ fileparse /; print join "\n" , __FILE__ , ( fileparse __FILE__ )[1] ;