#!/usr/bin/perl use DBI; use Encode; my $dbName = 'oadb'; my $dbUser = 'vxspace'; my $dbUserPass = 'xxx'; my $dbh = DBI->connect("dbi:Oracle:$dbName", $dbUser, $dbUserPass) or die "can't connect to database "; my $table_name= "…
[root@dr-mysql01 ~]# cat x5.pl use Encode; use JSON; use URI::Escape; use LWP::Simple; my $host = "http://ip.taobao.com/service/getIpInfo.php?ip=202.101.172.35"; my $content = get($host); print "\$content is $content\n"; $content =~ s/…
[oracle@oadb sbin]$ cat s1.pl #!/usr/bin/perl use DBI; use Encode; use HTTP::Date qw(time2iso str2time time2iso time2isoz); use Net::SMTP; sub send_mail{ if (@_ != 2){print "请输入2个参数\n";exit 1}; ($m,$n) = @_; #将参数赋值给变量 my $to_address = $m; my $Cu…
一:基础 1:安装perl centos: yum -y install perl 官网:https://www.perl.org/ 升级到5.22:先下载,执行./install.sh 安装 报错:/lib64/libc.so.6: version `GLIBC_2.14' not found (required by perl/bin/perl) 原因:编译时写死了glibc的版本,而系统中只到2.12 ,所以重装gli…