- 论坛徽章:
- 0
|
在unix下运行程序:
#!/usr/bin/perl
use time::Format;
use Time: arseDate;
use Data::Manip;
use strict;
my $var=$ARGV[0];
$var =~m/(\d*)\-(\d*)\-(\d*)/g;
my $day=$2."/".$3."/".$1;
print $day;
是没有问题的,但是在win下就报错,
Can't locate Data/Format.pm in @INC (@INC contains: C:/usr/site/lib C:/usr/lib .
) at npmdb1.pl line 2.
Can't locate Time/ParseDate.pm in @INC (@INC contains: C:/usr/site/lib C:/usr/li
b .) at npmdb1.pl line 3.
没有这些模块,于是我连到PPM上去安装这些模块 PPM> install Format.pm
Install package 'Format.pm?' (y/N): y
Installing package 'Format.pm'...
Error installing package 'Format.pm': Could not locate a PPD file for package Fo
rmat.pm
也报错,不知道是不是unix下和win下模块名字不同还是怎么回事呀,偶刚学perl不久,请高手指教, 很急 谢谢~~ |
|