Hi All,
Can we pass arguments while calling the perl script and as well as ask user input during execution of the script?
My program is as below:
I am passing arg1 and arg2 as argements to test.pl
]./test.pl arg1 arg2
Inside the test.pl I have :
print "Do you want a name ? (y/n) : ";
my $YN = <>;
chomp $YN;
print "YN = $YN \n";
On execution it by passing arguments gives me some junk values in $YN where as with out arguments it waits to ask the input.
Any solutions?
Thanks in advance
JS