Hi Mo,

The command line arguments are passed to your perl script in the array 
@ARGV, so in your example "data1" would be held in the 1st element of 
@ARGV which is $ARGV[0].

check out 'man perlvar' for more info.

Gary

On Tuesday 24 April 2001 11:53 am, Mo Holkar / UKG wrote:
> Hi all,
>
> This is a very dim question, but hey, this is a beginners' list so I
> hope you'll forgive me.
>
> I want to be able to pass variable data arguments to my perl script
> from an outside application by calling a command line that's
> something along the lines of:
>
> perl myscript.pl "data1" "data2 "data3"
>
> (a) is it possible to pass data arguments via the command line in
> this way?
>
> (b) inside the script I want to assign them to variables -- but how
> do I reference them? Do they count as being on STDIN or something?
>
> Thanks for your help,
>
> best,
>
> Mo
>
>
>
> Mo Holkar
> Undying King Games
> [EMAIL PROTECTED]
> http://www.ukg.co.uk

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 
    

Reply via email to