Re: Arguments not passed in Windows XP



At 2006-06-06 02:59PM, howard.lum@xxxxxxxxxx <howard.lum@xxxxxxxxxx> wrote:
I have a simple script that prints the number of passed arguments:

$numargs = scalar @ARGV;
print "numargs $numargs\n";

This script works fine on a number of our PCs but fails on two
particular PCs.

Invoking the script using 'numargs.pl 1 2 3' results in 0.
Invoking the script using 'perl numargs.pl 1 2 3' results in 3.

How can I get the first method to work properly? I am running v5.8.7
from ActiveState on Windows XP.

Start a command prompt, and enter: ftype perl
It should report something like:
perl="\path\to\perl.exe" "%1" %*

Make sure you see the %* parameter at the end

--
Glenn Jackman
Ulterior Designer
.



Relevant Pages

  • Re: Arguments not passed in Windows XP
    ... print "numargs $numargs\n"; ... This script works fine on a number of our PCs but fails on two ...
    (comp.lang.perl.misc)
  • Arguments not passed in Windows XP
    ... I have a simple script that prints the number of passed arguments: ... $numargs = scalar @ARGV; ... print "numargs $numargs\n"; ... This script works fine on a number of our PCs but fails on two ...
    (comp.lang.perl.misc)
  • Change local admin settings
    ... At the time, the simplest setup was to make each user a local admin, so ... and cross use PCs as need be. ... the logon script would hopefully add them back in before they'd ...
    (microsoft.public.windows.server.sbs)
  • Create mutiple PCs in the Domain using vbScripts
    ... Does anyone has a sample script that basically creates multiple PCs in the ... A text file contains all the PCs then the script reads it and add those pcs ... Dim objContainer, strComputerName, objComputer ...
    (microsoft.public.scripting.vbscript)
  • Re: Adding duplicate names in Windows 2003 Domain not issuing any Warn
    ... While our helpdesk team adding / joing any new PCs to domain with the ... existing names not showing any warnings (but if do the DSA console we are ... You can follow Syed's suggestion, to keep tabs on the event logs, or you can create a join machine script available for your techs, with a function to search AD for the name, and if found, deny the join. ... Microsoft Certified Trainer ...
    (microsoft.public.windows.server.active_directory)