-----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 `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 considered as occurring outside the execution of your program. "INIT" and "END" blocks, however, will be skipped. -- __END__ Just my 0.00000002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is at http://perldoc.perl.org/ ********************************************************************** Ok so what is the diff then? I search through all my emails, programming perl, perl best practices and PerlMonks but did not find anything. Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio _________________________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Svenska: www.cardinalhealth.com/legal/email -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>