BOLCATO CHRIS (esm1cmb) wrote: > Hello all, > Can "use" be used in a sub routine that is kept external?
Yes. > Ex. > Program 1. > > #!/bin/perl > require '/home/users/me/foo.pl'; > exit; > > > Foo.pl > > sub bar { > use strict; > use fcntl; > use AnyDBM_File; > } This would not be a typical formulation (although it's legal), because those modules (it's Fcntl, not fnctl BTW) will be loaded when the require is done, not when bar() is called. And strict will be block scoped (I think; anyone know for sure?). If you want to delay loading until bar() is called, either use require() or put the use()'s inside a string eval(). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>