谁用过 ubuntu 8.10 server 的 Perl ? 寻高手帮忙!

Python/PHP/Perl 开发与设计
回复
yangtj
帖子: 13
注册时间: 2008-10-05 13:31
送出感谢: 0
接收感谢: 0

谁用过 ubuntu 8.10 server 的 Perl ? 寻高手帮忙!

#1

帖子 yangtj » 2009-03-13 17:08

我这有一个脚本,运行出错,但是我查看安装有 该模块啊!请高手帮忙找出原因!
一、查看系统
root@ubuntu:~# perldoc File::Temp
File::Temp(3) User Contributed Perl Documentation File::Temp(3)



NAME
File::Temp - return name and handle of a temporary file safely

SYNOPSIS
use File::Temp qw/ tempfile tempdir /;

$fh = tempfile();
($fh, $filename) = tempfile();

($fh, $filename) = tempfile( $template, DIR => $dir);
($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
($fh, $filename) = tempfile( $template, TMPDIR => 1 );

binmode( $fh, ":utf8" );

$dir = tempdir( CLEANUP => 1 );
($fh, $filename) = tempfile( DIR => $dir );


二:我的脚本#!/usr/bin/perl
1 use POSIX;
2 use File::Temp;
........
........

53 my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";

三、运行脚本出错信息

Undefined subroutine &main::tempfile called at tot_stats line 53.

:em06
yangtj
帖子: 13
注册时间: 2008-10-05 13:31
送出感谢: 0
接收感谢: 0

Re: 谁用过 ubuntu 8.10 server 的 Perl ? 寻高手帮忙!

#2

帖子 yangtj » 2009-03-16 15:32

自己解决,原来是脚本的问题,修改后成功运行!
回复

回到 “Python/Php/Perl”