Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: rel2abs doesnot work in unix

by Smylers (Pilgrim)
on Jun 16, 2005 at 16:41 UTC ( #467349=note: print w/replies, xml ) Need Help??


in reply to rel2abs doesnot work in unix

for the file '../pictures/logo.gif', it returns the path as /sample/folder1/test/work/../pictures/logo.gif'

That has worked: you have it a relative path (one that depends on which directory you are in) and got back an absolute path (one that, in the case of Unix, starts with a slash and therefore refers to that file regardless of your current directory).

while actually it should be '/sample/folder1/test/pictures/logo.gif'

To clean up a path like that have a look at abs_path and friends in CWD.

Smylers

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://467349]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2018-02-24 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (310 votes). Check out past polls.

    Notices?