On Apr 28, Shilpa Arvind said:

>In C programming language we have a function which looks like this:
>
>main(int argc, char *argv[ ]).
>
>Is there a equivalant function in Perl. I was looking at @ARGV but i feel it
>does not behave the same way as the above function does. I might be wrong.

There is no need for a main() function in Perl.  As for what argc and
**argv hold, you can get the name of the program from $0, and the
arguments to your program in @ARGV.  The number of arguments to your
program is scalar(@ARGV), or ($#ARGV+1).

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
CPAN ID: PINYAN    [Need a programmer?  If you like my work, let me know.]
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to