Passing data arguments via command line

2001-04-24 Thread Mo Holkar / UKG
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

Re: Passing data arguments via command line

2001-04-24 Thread Steve Neu
> 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

Re: Passing data arguments via command line

2001-04-24 Thread Paul Johnson
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

Re: Passing data arguments via command line

2001-04-24 Thread David H. Adler
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