in reply to Re: Re: What's #! got to do with it?
in thread What's #! got to do with it?

You can fix that by changing the default action associated with the .pl extension. To do that you need to go to: explorer->tools->folder options->File Types->Extensions->PL->Advanced->Open->Edit

If you set that to something like c:\Perl\bin\perl.exe" "%1" %* you will automatically invoke the perl interpreter rather than notepad.

From this interface you can also add a separate option to be shown on right-click context menus. For example, you can set "Edit" as an option that uses notepad, but have it default to "Open" with the interpreter.

Replies are listed 'Best First'.
Re: Re: Re: Re: What's #! got to do with it?
by kelan (Deacon) on Jan 19, 2004 at 15:23 UTC

    Keep in mind that, at least on Win2k, that %* at the end will tell Windows to feed the entire rest of the line to your script, including redirects. So if you tried this:

    .\output.pl > anotherfile.txt
    @ARGV would look like this:
    @ARGV = ('>', 'anotherfile.txt');
    and the output would not be redirected. For that reason, I always use the perl script.pl version on Windows, which will work correctly with redirects.

    kelan


    Perl6 Grammar Student