Looking for a equivalant function in Perl for main(int argc, char *argv[ ])

From: Shilpa Arvind (shilparvind_at_hotmail.com)
Date: 04/28/04


To: beginners@perl.org
Date: Wed, 28 Apr 2004 11:50:30 -0700

Hi,

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.

Thanks in advance
Shilpa



Relevant Pages

  • Re: What is going on?
    ... Problem is i do not know Perl. ... $#ARGV is the array index of the last variable entered. ... $epc variable plus a '/' character. ... Save the return value of the $response->content subroutine. ...
    (comp.lang.perl.misc)
  • Re: Which programming method is better?
    ... process("standard input", stdin, flags) ... and not a filename argument. ... preincrement argv first. ... I'd also go with const char* instead of char*, ...
    (comp.lang.c)
  • Re: Different way of getting Standard input
    ... If there are entries in @ARGV (the variable that holds what ... (e.g. grep, wc, sort, etc). ... die "$0 needs a pattern to match with" unless @ARGV; ... cowens@amans:~$ perl grep.pl perl grep.pl ...
    (perl.beginners)
  • Re: Learning Perl : Exercices
    ... Welcome to Perl. ... First lesson: "isn't working" is the worst of all possible error ... foreach (@ARGV) { ... close ARGV if eof; #see perldoc -f eof for explanation ...
    (perl.beginners)
  • Re: Was `readdir [...] Comments on JKs script
    ... John W.Krahn writes: ... The following program does not use the $ARGV variable, nor does Perl ... ## hadn't seen `:raw' used before but apparently the:raw part is ...
    (perl.beginners)