Sorry, let's try that again with a sensible subject line -- Mo
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 li
> perl myscript.pl "data1" "data2 "data3"
>
> (a) is it possible to pass data arguments via the command line in this
way?
Yes, indeed. Anything that is passed to your program in this way will be
stored in the array, @ARGV. You can access the first argument with
$ARGV[0], the second with $ARGV[1
On Tue, Apr 24, 2001 at 12:09:28PM +0100, Mo Holkar / UKG wrote:
> perl myscript.pl "data1" "data2 "data3"
>
> (a) is it possible to pass data arguments via the command line in this way?
Yes.
> (b) inside the script I want to assign them to variables -- but how do I
> reference them? Do they
On Tue, Apr 24, 2001 at 06:52:02AM -0500, Steve Neu wrote:
> > perl myscript.pl "data1" "data2 "data3"
> >
> > (a) is it possible to pass data arguments via the command line in this
> way?
>
[snip options]
> -or-
>
> my ($username, $password, $logfile, $filename) = @ARGV
> # Expect 4 argum