940329 - 在perl中的readdir时如何解析文件名太长? [英] 940329 - how to resolve Filename too long when readdir in perl?

查看:115
本文介绍了940329 - 在perl中的readdir时如何解析文件名太长?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,当perl脚本试图'opendir'具有长路径的目录时,我得到文件名太长。我使用activeperl来运行perl脚本。

如何解决它?

解决方案

使用Win32-LongPath [ ^ ]:

Quote:

虽然Perl本身支持可以访问Windows中文件的函数,但这些函数对于Unicode或长文件路径失败(即大于大约255个字符的Windows MAX_PATH值)。 Win32 :: LongPath通过使用支持Unicode和扩展长度路径的Windows宽字符函数克服了这些限制。


in Windows, i get "Filename too long" when the perl script tries to 'opendir' the directory with long path. i use activeperl to run the perl script.
how can i resolve it?

解决方案

Use Win32-LongPath[^]:

Quote:

Although Perl natively supports functions that can access files in Windows these functions fail for Unicode or long file paths (i.e. greater than the Windows MAX_PATH value which is about 255 characters). Win32::LongPath overcomes these limitations by using Windows wide-character functions which support Unicode and extended-length paths.


这篇关于940329 - 在perl中的readdir时如何解析文件名太长?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆