Re: Perl file with arguments

2010-06-09 Thread Shlomi Fish
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

Re: Perl file with arguments

2010-06-09 Thread trapd00r
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_