RE: simplify a path

2008-07-02 Thread Chen Yue
--"; print "\nHave a nice day !!!\n"; [root@ ~]# perl t.pl str = [/a/b/./c/../d] str1 = [/a/b/./c/../d] --- str = [/a/b/./c/../d] str1 = [/a/b/./d] --- str = [/a/b/./c/../d] str1 = [/a/b

RE: simplify a path

2008-07-02 Thread Chen Yue
Hi Peter Actually, I don't want to translate the path into realpath because some of the paths even do not exist on the host. What I need is just a simplified format. Anyway, thank you for the advice. On Wed, 02 Jul 2008 21:33:59 +0800, Chen Yue wrote: > I have a file containing UNI

RE: simplify a path

2008-07-02 Thread Chen Yue
Hi Rob Thank you for the suggestion. Actually, abs_path requires the original path exists on the host. But my case does not fulfill this. This is what puzzled me. Sent: Wednesday, July 02, 2008 9:58 PM To: beginners@perl.org Cc: Chen Yue Subject: Re: simplify a path Chen Yue wrote: >

simplify a path

2008-07-02 Thread Chen Yue
Hi I have a file containing UNIX-styled Path in each line. But the path is simplified enough. Some of them has ".." and "." in the middle, such as "/a/b/./c/../d". Now I want to simplify each Path according to Unix tradition. /a/b/./c/../d->/a/b/d The only way I could think out is to sp

答复: is there a way to read content fro m lnk on windows?

2008-01-25 Thread Chen Yue
Hi I fully understand this. So I wonder is there a way to get the path that the blabla.lnk points to? -- Windows does not support the "links" that Unix has. Windows links have a .lnk extension that you can check for. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

is there a way to read content from lnk on windows?

2008-01-24 Thread Chen Yue
Hi On Linux, I can use "-l" to judge whether a file is a soft link and use readlink/Cwd::realpath to get its real path. But on windows (activeperl), seems both function do not work. Is there a way to do this for me? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

答复: Help in system function

2008-01-17 Thread Chen Yue
If you are in a *nix system, you can try to run $result=` mk_view $view_name ETC` instead and see the output from $result. It may be helpful to find the root cause. -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 发送时间: 2008年1月17日 22:16 收件人: beginners@perl.org 主题: Help in sys