Clear questions and runnable code
get the best and fastest answer
Re: How to get full path name in windows?by 2teez (Priest)
|on Dec 10, 2012 at 03:59 UTC||Need Help??|
Am adding just a "kobo" suggestion, using your OP and the modification provided by ww to your script.
Also, take note of this important info from File::Spec documentation about the "rel2abs".
rel2abs() Converts a relative path to an absolute path.
If $base is not present or '', then Cwd is used. If $base is relative, then it is converted to absolute form using rel2abs(). This means that it is taken to be relative to Cwd.
On systems with the concept of volume, if $path and $base appear to be on two different volumes, we will not attempt to resolve the two paths, and we will instead simply return $path .
The above explain, why you are getting this:
instead of this
You may also want to look into the module Path::Class and it's "cousins".
Path::Class 'just' is a "wrapper" for File::Spec.
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me