On Wednesday 09 Jun 2010 10:44:35 Gopal Karunakar wrote:
> Hi,
>
> How can i declare a simple perl script file which will take arguments
> from the user? an example will be take two numbers and give the sum as
> output.
>
> Thanks in advance,
>
See @ARGV:
[code]
#!/usr/bin/perl
use stric
On 09/06/10 13:14 +0530, Gopal Karunakar wrote:
How can i declare a simple perl script file which will take arguments
from the user? an example will be take two numbers and give the sum as
output.
use strict;
print calc(@ARGV);
sub calc {
my @to_add = @_;
my $i = 0;
for my $num(@to_