Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I require files that have dynamic names?

Status
Not open for further replies.

calabama

Programmer
Feb 19, 2001
180
US
#!/usr/local/bin/perl

use CGI qw/:standard/;
CGI::ReadParse(input);

$SELECT= $input{'select'};

$CONFIG_SELECT = $SELECT."_config"."."."pm";

$TEST = "../"."partnerships"."/".$SELECT."/".$CONFIG_SELECT;

require ('$TEST');

Thanks

 
First of all,

require "$TEST";
or require $TEST;
Single quotes won't get interpolated.

Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top