RE: What is the function of BEGIN in perl

2006-07-05 Thread Smith, Derek
-Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 1:21 PM To: Perl Beginners Subject: Re: What is the function of BEGIN in perl Smith, Derek wrote: > Doesn't the BEGIN and INIT constructs provide the same behavior? No. From

Re: What is the function of BEGIN in perl

2006-07-05 Thread Mr. Shawn H. Corey
Smith, Derek wrote: > Doesn't the BEGIN and INIT constructs provide the same behavior? No. From `perldoc perlrun`: -c causes Perl to check the syntax of the program and then exit without executing it. Actually, it will execute "BEGIN", "CHECK", and "use" blocks, because these are consid

RE: What is the function of BEGIN in perl

2006-07-05 Thread Smith, Derek
-Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 7:36 PM To: chen li Cc: beginners@perl.org Subject: Re: What is the function of BEGIN in perl On Mon, 2006-01-05 at 15:32 -0700, chen li wrote: > Dear all, > > Recently I read so

Re: What is the function of BEGIN in perl

2006-05-02 Thread chen li
Thanks very much for Anthiny and others for the explanation. Li --- Anthony Ettinger <[EMAIL PROTECTED]> wrote: > basically, BEGIN { } is a block which gets called > whenever the script > begins. > > > > On 5/1/06, chen li <[EMAIL PROTECTED]> wrote: > > > > Dear all, > > > > Recently I read s

Re: What is the function of BEGIN in perl

2006-05-01 Thread Mr. Shawn H. Corey
On Mon, 2006-01-05 at 15:32 -0700, chen li wrote: > Dear all, > > Recently I read some source codes of perl modules. I > find some codes look like this: > > BEGIN {..} > > What is the function of BEGIN here? BEGIN clauses are executed immediately after they are compiled. As su

Re: What is the function of BEGIN in perl

2006-05-01 Thread Anthony Ettinger
basically, BEGIN { } is a block which gets called whenever the script begins. On 5/1/06, chen li <[EMAIL PROTECTED]> wrote: Dear all, Recently I read some source codes of perl modules. I find some codes look like this: BEGIN {..} What is the function of BEGIN here? Thank

RE: What is the function of BEGIN in perl

2006-05-01 Thread Charles K. Clarkson
chen li wrote: : Recently I read some source codes of perl modules. I : find some codes look like this: : : BEGIN {..} : : What is the function of BEGIN here? Read BEGIN, CHECK, INIT and END in the "perlmod" file. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254

What is the function of BEGIN in perl

2006-05-01 Thread chen li
Dear all, Recently I read some source codes of perl modules. I find some codes look like this: BEGIN {..} What is the function of BEGIN here? Thank you, Li __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protect