on Wed, 29 May 2002 14:41:23 GMT, [EMAIL PROTECTED] (Jose Torres)
wrote:
> Thanks for your help everyone. I had a related question. It looks
> like readdir just return relative filenames and not absolute ones.
> Is there a way/method to return absolute filenames? For example,
> if I'm in /home/docs that has a text file (foo.txt) and I call
> readdir, I want to return /home/docs/foo.txt instead of just
> foo.txt. I could theoretically just append foo.txt to a
> "/home/docs/" prefix, but I'm trying to make my code more generic
> and not hard-code everything if possible. Thank you.
'readdir' will not return paths, so you will have to stick *something*
in front of the filenames. If you want to work from the current
directory, have a look at the functions in the 'Cwd' module
perldoc Cwd
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]