Hi,
 I am completely stumped with how to proceed with this.
I have a program where the user inputs a path to a file. This is under
windows xp

The path can be relative
..\..\..\synthesis\int_code.psm
.\program\synthesis\int_code.psm

or absolute
c:\command\tool\program\synthesis\int_code.psm

I do not know what it is in advance.

1)I would need perl to be able to distinguish between a relative and
absolute path

2) If the path is relative, create an absolute path from that.

My orignal idea was to locate ..\ with regex using m/([.]{2}\\)/ This
would indicate if the path is relative or not

use cd to obtain the present working directory. Is there a better way
to do this???

then go through all the regex located and replace them appropriately
with data obtained from cd.

Can anybody help me with this or can you think of a better idea.
Thanks a lot.
Amish


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to