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

Hi Monks,

I have a perl script with some default values. It takes two user input to change its values and write the content in output file..

The script looks like:
$input1= <STDIN>; $input2 = <STDIN>; print(" firstinput = $input1 secondinput = $input2
.........

To run the script in cmd, I use:

perl script.pl >> outputfile firstinput_value secondinput_value

Note that I have to use two return to enter the input file values, but instead, I want to use:

perl script.pl firstinput_value secondinput_value >> outputfile

Plz help

Replies are listed 'Best First'.
Re: user input without return
by Athanasius (Archbishop) on Aug 19, 2013 at 08:30 UTC
      perfect..thanks
Re: user input without return
by vinoth.ree (Monsignor) on Aug 19, 2013 at 09:12 UTC

    Hi utpalmtbi,

    You could have searched in google for "perl pass command line arguments",


    All is well

      Yeah, sure, but perhaps utpalmtbi did not know exactly what to look for.