Paul Kraus wrote: > This brings up an interesting oddity that I have on my windows install. > I can execute a script by just calling it.... > > Myscript.pl > > This works however if I need to pass arguments on the command line then it > fails. I have to call it like this.... > > perl myscript.pl arg1 arg2 > > Anyone ideas on to why?
Not really. The following testargs.pl: #!perl -w my ($arg1, $arg2) = @ARGV; print "first argument was $arg1\n"; print "second argument was $arg2\n"; Renders the following output when called from the command line. Greetings! E:\d_drive\perlStuff>testargs.pl Joseph Paul first argument was Joseph second argument was Paul It could be some subtle problem with the file association, or .pl could be missing from the pathext environment variable, as per Jenda's suggestion concerning the .exe extension. To check the file association: >From Windows Explorer, select Tools|Folder Options Click on the File Types tab. Select "PL" in the list presented Click on the Advanced button in the lower pane Select the Open command [probably the only one listed. I also have an Edit command associated with Programmer's File Editor] Click the Edit button in the right pane. The "Application used to perform action" line should look like this: "C:\Perl\bin\perl.exe" "%1" %* The %1 indicates that the first param is the filename being called. The %* means that any further parameters are offered after the script name. Could the %* be missing? Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]