perl 的 Getopt::Long 模組,在下指令時讓參數得到值
作者:cross 日期:2011-08-06 16:00
perl 所謂的參照
作者:cross 日期:2011-08-02 23:59
perl 的map功用
作者:cross 日期:2011-08-02 23:18
quote : http://note.tcc.edu.tw/217.html
1. 將 qw LIST 中的數值開根號 x10
my @array = map { sqrt($_)*10 } qw/50 60 70 75 91 18 39 66/;2. 將 0-9 平方後丟到 @array中 @array=(0,1,4,9,16,25,36,49,64,81)
my @array = map { $_ ** 2 } (0..9);3. 將清單加上@domain name,注意這裡的 '@note.tcc.edu.tw' 是以單引號括起,否則用雙引號會把 @note 視為陣列
@user= (' axer', 'john', 'peter', 'lee');
@mail = map { $_ . '@note.tcc.edu.tw' } @user;結果 @mail= ( ' axer@note.tcc.edu.tw', 'john@note.tcc.edu.tw', 'peter@note.tcc.edu.tw', 'lee@note.tcc.edu.tw' );
4. 下例map 將@m 陣列中的字串空白移除,@m 本身被改變
@m=(" www", "facility ", " mail ");
map { s/s+//g } @m;
print "@m ";結果 www facility mail
perl 關於排序功能
作者:cross 日期:2011-08-02 22:41
foreach $value (sort {$coins{$a} cmp $coins{$b} } keys %coins)
{
print "$value $coins{$value}";
}
# ref :http://note.tcc.edu.tw/285.html
sort 以 ASCII 順序來將陣列排序
sort 以數值大小排序@a =qw(11 1 5 7 2);
@b = sort @a;
print join ',',@b," ";
The Anti-Abuse Project的Multi-RBL check檢查你的ip是否被列入黑名單群裡
作者:cross 日期:2011-08-02 12:58
hping 類似 ping 的網路封包測試工具
作者:cross 日期:2011-07-22 12:33
hping 是一個封包分析工具,它類似於 ping ,但比它強很多
支援 ICMP, TCP, UDP, RAW-IP, traceroute mode
也可以作以下測試用
- Firewall testing
- Advanced port scanning
- Network testing, using different protocols, TOS, fragmentation
- Manual path MTU discovery
- Advanced traceroute, under all the supported protocols
- Remote OS fingerprinting
遇到 nfs 無法被 umount的問題
作者:cross 日期:2011-07-14 14:34




