James Edward Gray II wrote:

>On Jan 19, 2004, at 6:31 AM, Jan Eden wrote:
>
>>Hi,
>>
>>I wrote some scripts using File::Find's find function like this
>>
>>find (\&process, $path)
>>
>>I get $path either from the command line or from a default string.
>>Now how can I enable my scripts to deal with relative pathnames?
>>Right now, the script complains not being able to process (open
>>etc.) the files if I do not specify an absolute path.
>>
>>Is there a simple way to convert relative paths to absolute ones?
>
>Sure is:
>
>use File::Spec; my $abs_path = File::Spec->rel2abs( $rel_path );
>
>Hope that helps.

It certainly does. Thanks! I always hesitate to use perldoc, since the system is so 
crippled on my machine.

'perldoc perldoc' does not work, and the whole perlfaq is missing (on OS 10.3).

Unfortunately, rel2abs and abs2rel are not mentioned in either Perl in a Nutshell or 
Programming Perl.

Thanks again,

Jan
-- 
How many Microsoft engineers does it take to screw in a lightbulb? None. They just 
redefine "dark" as the new standard.

--
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