I guess you're joking?
Anyhow why can't I call one script from another script and send it @ARGV ?
Because your association is wrong; to quote myself, when I wasn't joking, "You need %* after the "%1" in the command your association runs".
Since that wasn't enough information for you, here are more details: A .pl is not an executable file from Window's perspective. It has to be associated with an application (perl.exe, in this case), otherwise Windows cannot do anything with it. If you didn't have an association, you wouldn't get the script to run at all by just calling scriptname.pl, with or without arguments after it. Since it runs, but just doesn't pass arguments, I can nearly guarantee that there is an association, but that it is only passing the .pl filename to the script (with "%1"), and not any additional arguments you pass (with %*). If you want Windows to pass the command line arguments, "You need %* after the "%1" in the command your association runs". The symptoms you describe indicate that your association doesn't have the %* it needs.
Run regedit, then navigate to HKEY_CLASSES_ROOT\.pl. The default value will say something like auto_pl_file or PerlScript, or something like that. Navigate to HKEY_CLASSES_ROOT\auto_pl_file or whatever it was called; there will be a subkey called shell, with a subkey something like run, with a subkey called command. The default value for the command will be similar to c:\strawberry\perl\bin\perl.exe "%1", where the path to perl.exe will be wherever your copy of strawberry perl is; you need to change it c:\strawberry\perl\bin\perl "%1" %*, with the %* included. If the %1 is not in quotes, put it in quotes, otherwise any script that has a filename or path element that has a space will not work either.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||