> 
> Hello all,
> Can "use" be used in a sub routine that is kept external?
> Ex.
> Program 1.
> 
> #!/bin/perl
> require '/home/users/me/foo.pl';
> exit;
> 
> 
> Foo.pl
> 
> sub bar {
> use strict;
> use fcntl;
> use AnyDBM_File;
> }
> 

Did you try it? Did it return an error?  Note that 'require' is runtime,
but 'use' is compile time, except when the 'use' happens in a 'require'
I suspect, in which case it is at compile time at the point of the
require.  Also note that 'strict' is a pragma rather than normal module.
And what is fcntl?

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to