www.mjjq.net > pErl or DiE

pErl or DiE

#!usr/bin/perl -wuse strict;use 5.014;open IN, "", $ARGV[1] or die "out error\n"; #新建文件, 文件句柄为OUT, 文件名为命令行里第二个参数while(){ #逐行读入文件,以下为按行操作 chomp; if(/Molecule: ZINC/){ s/Molecule: //; # 行替换...

perl脚本的内容仅包括如下这部分: #!/usr/bin/perl# write by huabo, 2009-11-20use warnings;use strict;#open the svn passwd fileopen (FILE, "passwd") or die ("Cannot open the passwd file!!!n");#clear the apache passwd fileopen (OU...

open A, "A.txt" or die "Can't open A";my @data = ;close A;my %hash;++$hash{$_} foreach @data;open B, "B.txt" or die "Can't open B";open C, ">A无B有.txt" or die "Can't open Output A无B有";# 请改成英文档名while ( ) { if ( $hash{$...

my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 }) or die $DBI::errstr;my $sql=qq(copy data_yhm FROM '/home/kettle/yhm/aaa.data' DELIMITER '|');my $sqle=$dbh->prepare($sql) or die "120-Syntax error:$!\n";$sql...

看上去还好嘛... 不如试试这样写怎样 ? open FH, "E:/perl1.txt" or warn $!;print ;close FH;#如果不行, 再加下面一句print `dir e: /b`;# 看看是否真的有 perl1.txt还有就是, 你在档案总管里是否已设成显示所有副档名? 会不会你改了个名叫 per...

my $ex = Win32::OLE->new('Excel.Application') or die "oops\n";$ex->{Visible} = 1;$ex->Workbooks->Add;$ovR8 = Variant(VT_R8, "3 is a good number");$ex->Range("A1")->{Value} = $ovR8;$ex->Range("A2")->{Value} = Variant(VT_DATE, 'J...

网站地图

All rights reserved Powered by www.mjjq.net

copyright ©right 2010-2021。
www.mjjq.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com