CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
2 Address module via variable- is there a way?

 



pozvanete
Novice

Mar 7, 2009, 6:42 PM

Post #1 of 2 (2014 views)
2 Address module via variable- is there a way? Can't Post

$my_module = 'new_pm';

if($my_module eq 'new_pm'){ use $my_module ; }

Is it possible with eval or ..?


KevinR
Veteran


Mar 7, 2009, 7:16 PM

Post #2 of 2 (2012 views)
Re: [pozvanete] 2 Address module via variable- is there a way? [In reply to] Can't Post

With require it is:


Code
$my_module = 'new_pm';  

if($my_module eq 'new_pm'){require $my_module ; }


There is also the "if" pragma:

http://perldoc.perl.org/if.html
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives