Misuse of "use"?

2005-08-12 Thread Randy Macdonald
(I posted this to the beginning_perl group on Yahoo groups, but the two- hour wait trie my patience. My apologies if this meesage is not new for some of you all.) --- Folks; This is #1 of I'm sure many Perl questions. Thanks to all who help in advance. I

Re: Misuse of "use"?

2005-08-12 Thread Jeff 'japhy' Pinyan
On Aug 12, Randy Macdonald said: However, when I run: print ''; use NotARealPackage; print ''; I expect to get: but I get no output at all. Why is this? The 'use' statement is special to Perl. It is executed at compile-time, not at run-time like most of the rest of your code. Because o

Re: Misuse of "use"?

2005-08-12 Thread Manav Mathur
> On Aug 12, Randy Macdonald said: > > > However, when I run: > > > > print ''; > > use NotARealPackage; > > print ''; > > > > I expect to get: > > > > > > > > but I get no output at all. Why is this? > > The 'use' statement is special to Perl. It is executed at compile-time, > not at run-time li

Re: Misuse of "use"?

2005-08-13 Thread Randy Macdonald
[EMAIL PROTECTED] (Jeff 'japhy' Pinyan) wrote in news:[EMAIL PROTECTED]: > The 'use' statement is special to Perl. It is executed at > compile-time, not at run-time like most of the rest of your code. > Because of this, your print() statements are never even executed. In > fact, only the first