Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 perl 中的 .rar 存档提取到指定路径。我试过这个:
my $archive= 'text.rar'; my $directory = 'photos'; my $rar = Archive::Rar->new( -archive => $archive ); $rar->Extract(-to => $directory);
但这没有解决,它总是将其提取到我的根文件夹中...
是否有任何命令可以告诉 Archive::Rar 另一个目录?
提前致谢!
事实证明,有一个未记录的选项:
my $rar = Archive::Rar->new( -archive => $archive, -initial => $directory); $rar->Extract();
会这样做。