http://qs1969.pair.com?node_id=439877


in reply to Converting VBScript to PerlScipt

VBScript has two types of arguments... Named and Anonymous and they are provided as follows:

C:> cscript.exe /nologo script.vbs /CycleDate:01-12-2005 /Test:2 Arg1 +Arg2 Arg3

This results in three Collection Objects Arguments(), Arguments.Named() and Arguments.UnNamed()

These will have elements

'VBScript, not Perl Arguments.Named("CycleDate") 'value="1-12-2005" Arguments.Named("Test") 'value="2"

There should be three elements of Arguments.UnNamed() with values "Arg1", "Arg2" and "Arg3".

Documented at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wslrfnamedproperty.asp

If you're converting you might use Getopt::Long - then you'd have GetOptions( "CycleDate"=>\$cycledate ...) or warn...

HTH -- Mark