Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Converting VBScript to PerlScipt

by maa (Pilgrim)
on Mar 16, 2005 at 08:14 UTC ( [id://439877]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://439877]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found