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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Paths

Status
Not open for further replies.

DonP

IS-IT--Management
Jul 20, 2000
684
US
I have a simple routine that uses cwd to get the physical path and it works fine when the files being referred to are in or under that directory. But to make it fully dynamic when some data or other files are outside that directory and need a hard-coded path, how I can take the variable for the path and make it "back up" and give another variable for the new path? Is it possible? Here's the basic cwd code as it is now. This is a Linux server. Thanks!

Don

[tt]
if ($] >= 5) {
use Cwd;
$cwd = getcwd();
} else {
print &quot;<B>Your version of Perl needs getcwd.pl library to obtain the
current working directory. We will \&quot;require\&quot; it now.</B><P>&quot;;
require &quot;getcwd.pl&quot;;
$cwd = getcwd();
}
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top