in reply to Re: Installing PAR
in thread Installing PAR

Thanks for the tip. I tried it and it does work quite well. However, I have one problem with it. In my code I find out the current path by using the following command:

(my $path = $0) =~ s/\\^\\+$//;

This works fine in the ordinary script but when Cava has made an executable of it the path is equal to "-e". Anyone who knows a way to get the path that is consistent also after Cava has done its work?

Thanks!

Replies are listed 'Best First'.
Re^3: Installing PAR
by GrandFather (Saint) on Feb 27, 2009 at 10:11 UTC

    Given that you are running the script under Windows you can:

    use Win32; my $path = Win32::GetCwd();

    which gives the current directory when the script is executed. That may not be the same as the directory containing the script of course.


    True laziness is hard work