RE: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])
From: Bob Showalter (Bob_Showalter_at_taylorwhite.com)
Date: 04/28/04
- Next message: Jeff 'Japhy' Pinyan: "Re: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])"
- Previous message: James Edward Gray II: "Re: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: 'Shilpa Arvind' <shilparvind@hotmail.com>, beginners@perl.org Date: Wed, 28 Apr 2004 15:12:17 -0400
Shilpa Arvind wrote:
> 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.
@ARGV does not contain the program name as the first element. That is placed
in $0 instead. Read the relevant sections in perldoc perlvar. Also read the
section on "C Traps" in perldoc perltrap.
- Next message: Jeff 'Japhy' Pinyan: "Re: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])"
- Previous message: James Edward Gray II: "Re: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|