发现win32下的perl 5.8.8 abs_path 和 rel2abs 的结果是一样的
但是我那个 perl 5.8.9 for solaris 结果不一样 On 2/13/09, Michael Zeng <[email protected]> wrote: > > 这么复杂啊, 成功是成功 > > 但是 我想 rel2abs 的功能也太弱了吧,好像就是 > > use Cwd ; > > my $current = getcwd() ; > > ( File::Spec->rel2abs('..') = $current ) =~ s/$/\.\./ ; 也就是在后面加上 而已 > > 这不就是regexp么, 有什么意义呢 > > > > > On 2/13/09, Shu Cho <[email protected]> wrote: >> >> use File::Spec; >> use Cwd qw(abs_path); >> print abs_path(File::Spec->rel2abs('..')), "\n"; >> >> 2009/2/13 Michael Zeng <[email protected]>: >> > dear all: >> > >> > why >> > >> > use File::Spec ; >> > print File::Spec->rel2abs ( '..' ) >> > >> > only get /ux/prj/prjhzeng/.. ? >> > >> > i want the absolute address , like /ux/prj >> > >> > thanks >> > >> > >> > -- >> > Yours Sincerely >> > Zeng Hong >> > > >> > >> >> >> >> > > > -- > Yours Sincerely > Zeng Hong -- Yours Sincerely Zeng Hong --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
