basicdez has asked for the wisdom of the Perl Monks concerning the following question:

Okay I am now passing my needed parameters with a system call, but how do I pick them up on the other end. With what I have here, I am getting nothing passed into!

Here is the line I am trying, but it is not working...

my ( $arg1 , $arg2, $arg3 ) = @_; #To read parameters system (" $number $name $type"); #To send them
Please help me if you can? </code>

Replies are listed 'Best First'.
Re: Reading in parameters
by derby (Abbot) on Mar 13, 2002 at 12:55 UTC

    That was answered in the original thread.

    my( $arg1, $arg2, $arg3 ) = @ARGV

    You don't really need to assign to argX, perl automatically places the command line args in the @ARGV array for you.


Re: Reading in parameters
by ChOas (Curate) on Mar 13, 2002 at 12:58 UTC

    In use the following:
    my ( $arg1 , $arg2, $arg3 )=@ARGV;
    And they should magically appear, and be usable, in

    And might I advice you to use:
    system (,$number,$name,$type);
    If you`re not gonna use the shell, just do it for safety`s sake...

    Hope this helps!


    print "profeth still\n" if /bird|devil/;
Re: Reading in parameters
by PrimeLord (Pilgrim) on Mar 13, 2002 at 14:57 UTC
    In the spirit of TIMTOWTDI you could always look at Getopt::Std. It would give you a little more flexibilty with your arguments.