摘要: perl 返回文件句柄的2种方式1.使用 \*#!/usr/bin/perluse strict;sub openfile(){ my $path=shift; open(FILE,"$path") or die "Can't open $path $!\n "; return \*FILE; }my $temp=&openfile("config");my @file=;print @file;2.使用变量#!/usr/bin/perluse strict;sub openfile(){ my $file; my $ 阅读全文
posted @ 2013-08-01 23:43 to be crazy 阅读(3916) 评论(0) 推荐(1) 编辑