in reply to .pl or shebang

A few other notes. On Windows it is up to the shell, or application running the program, to get the file extension association from the registry - the OS does not do it (see Win32::FetchCommand).
You can get a list of file extension associations on the command-line with:
assoc|more
You should see: .pl=Perl. Perl is associated with the perl executable in the registry as well (HKEY_CLASSES_ROOT)
You can create a new association on the command-line with (for example):
assoc .ppl=Perl
The effect is saved in the registry.

Replies are listed 'Best First'.
Re^2: .pl or shebang
by almut (Canon) on May 15, 2009 at 14:06 UTC

    Maybe it's worth also mentioning the other one, which associates file types with the actual commands: ftype

Re^2: .pl or shebang
by Jenda (Abbot) on May 16, 2009 at 22:35 UTC

    The OS does do it. Depends on the function you call. See Win32::FileOp::ShellExecute.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.