在Windows 7中,使用ActivePerl @ARGV为空
发布时间:2020-12-14 04:35:00 所属栏目:Windows 来源:网络整理
导读:我有以下Perl脚本.我正在使用ActivePerl在 Windows 7中运行它: #!c:Perl64binperl.exe -wuse strict;my $mp3splt_exe = 'c:Program Files (x86)mp3spltmp3splt.exe';my $mp3splt_args = '-o "@n @f" -g "r%[@o @N]" -f -t 6.0';print @ARGV;my $filen
我有以下Perl脚本.我正在使用ActivePerl在
Windows 7中运行它:
#!c:Perl64binperl.exe -w use strict; my $mp3splt_exe = 'c:Program Files (x86)mp3spltmp3splt.exe'; my $mp3splt_args = '-o "@n @f" -g "r%[@o @N]" -f -t 6.0'; print @ARGV; my $filename = $ARGV[0]; print "$mp3splt_exe $mp3splt_args $filenamen"; (你可以看到,我正在为mp3splt创建一个包装:-)) 当我这样运行它:
我得到这个: Use of uninitialized value $filename in concatenation (.) or string at C:Program Files (x86)mp3spltrun_mp3splt.pl line 12. c:Program Files (x86)mp3spltmp3splt.exe -o "@n @f" -g "r%[@o @N]" -f -t 6.0 所以,首先,当我打印@ARGV时,没有打印出来,其次,当我分配$filename = $ARGV [0]时,$filename是undef,所以我得到警告. 那么我做错了什么?为什么没有将命令行参数传递给脚本?
我确定Windows 7不了解shebang行.如果使用perl run_mp3splt.pl a运行,会发生什么?
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Windows – Git Push To Remote Server使用Cygwin挂起
- windows – 集中远程AD DC?
- windows-10 – IIS报告在WLS Bash中创建的文件夹“404 Not
- windows-server-2008-r2 – 对Server 2008 R2 Enterprise上
- .net – 如何异步打开Windows中的文件
- windows-server-2003 – 如何修复’存储库永久移动’?使用
- 在Windows上的Makefile中使用环境变量
- MDT部署:为什么禁用更改Windows更新设置等
- 如何检测Windows XP机器上是否播放任何声音
- 域名系统 – Windows 7:“本地主机名称解析在DNS本身内处理
推荐文章
站长推荐
热点阅读