Tags » Perl

Repost: Perl内置特殊变量

1、$n   :包含上次模式匹配的第n个子串
2、$&   :前一次成功模式匹配的字符串
3、$`   :前次匹配成功的子串之前的内容
4、$’   :前次匹配成功的子串之后的内容
5、$+  :前一次使用括号的模式匹配的字符串.

1、$|  :如果设置为零,在每次调用函数write或print后,自动调用函数fflush,将所写内容写回文件
2、$%  :当前输出页号
3、$=  :当前每页长度
4、$-  :当前页剩余的行数
5、$~  :当前报表输出格式的名称.默认值是文件句柄名. 75 more words



I came across a programming problem which I decided to answer in PERL.

“Design a program that simulates the following game:

Role five 12-sided die. The sides of each die have the numbers 0-9 printed on ten faces, ‘Batman’ printed on one face, and ‘Joker’ printed on the last face. 357 more words


SMS Gateway dengan Perl

SMS Gateway

Pada pertengahan tahun 2005 penulis mengerjakan proyek SMS Gateway untuk proses perhitungan suara pada Pilkada di Jember. Pada saat itu penulis menggunakan aplikasi… 5,124 more words


PERL Code Example

A common task I had was creating a lot of files that looked very similar to one another. These files contained coded instructions to be carried out on some subset of data. 292 more words


Perl & SNMP

Who’d have thought that the two packages perl-Net-SNMP and net-snmp-perl were different?   Not me until I was using a couple of nagios plugins.

So if you’re getting the error message of “Can’t locate Net/SNMP.pm”, you’ll need:

yum install perl-Net-SNMP

Linux And Tech

(Fat comma, dereference, list context):Perl

Just get it from a Perl Mongers Meetup in Chicago. => in Perl can be literally substituted by ,. It makes sense to a lot of things. 154 more words