2015-02-08から1日間の記事一覧

ミニマルPerl のメモ

catと同様の動作をする$ perl -w -e 'while(<>) { print; }' file file2 abc def$ perl -wnl -e 'print;' file file2 abc def$ perl -wpl -e '' file file2 abc def #--- perlの重要な起動オプション(P16) e w n p l 0 #--- perlの起動のオプション詳細 n: …

perldebugの使い方

●変数に値を設定して表示($xxx=yyy, p $xxx)12: my $pattern; DB $pattern='perl' DB p $pattern perl DB●周辺のソースを表示(l, v) DB l 12==> my $pattern; 13 #print "Enter search string: "; 14 #chomp ($pattern = <> ); 15: chomp ($pattern = './per…