Perl Advent Calendar The 2006 Perl Advent Calendar is at its new, permanent home. Last year's calendar is still here.
LimeChatのマクロ機能は、dllを呼び出してあれこれすることもできるんだけど、dll作るのは面倒だと思うので、間接的にperlのスクリプトを実行できるdllを作った。自分では前から使ってるんだけど。 http://highfreq.net/dev/limePerl.zip 使い方 perlを使える環境にする。(perlにパスが通っている状態にすること) 中に入っているlimePerl.dllを、LimeChatのMacro\Fileフォルダに置く。 実行したいスクリプトを同じ場所に置く。(例えばmacro.pl) LimeChatのマクロ設定で、動作の情報に $DllString(limePerl.dll,getIRCmessage,Macro\File\macro.pl %m) あとは適当に入力。 こんな感じ。%mの部分が標準入力($ARGV[0])に入り、標準出力に出た文字列がI
Contained in perl NAME DESCRIPTION perlfaq: Structural overview of the FAQ. perlfaq1: General Questions About Perl perlfaq2: Obtaining and Learning about Perl perlfaq3: Programming Tools perlfaq4: Data Manipulation perlfaq5: Files and Formats perlfaq6: Regular Expressions perlfaq7: General Perl Language Issues perlfaq8: System Interaction perlfaq9: Networking About the perlfaq documents Where to g
NAME HTTP::Date - HTTP::Date - date conversion routines VERSION version 6.06 SYNOPSIS use HTTP::Date; $string = time2str($time); # Format as GMT ASCII time $time = str2time($string); # convert ASCII date to machine time DESCRIPTION This module provides functions that deal the date formats used by the HTTP protocol (and then some more). Only the first two functions, time2str() and str2time(), are e
NAME Digest::SHA - Perl extension for SHA-1/224/256/384/512 SYNOPSIS In programs: # Functional interface use Digest::SHA qw(sha1 sha1_hex sha1_base64 ...); $digest = sha1($data); $digest = sha1_hex($data); $digest = sha1_base64($data); $digest = sha256($data); $digest = sha384_hex($data); $digest = sha512_base64($data); # Object-oriented use Digest::SHA; $sha = Digest::SHA->new($alg); $sha->add($d
[ ↑ INDEX ] [ NEXT → ] Lesson 1 1行スクリプト,コマンドライン・オプション,特殊変数 ($_, $., $ARGV) ■0. 準備 指定のファイルをダウンロードし展開する。展開したら,ls コマンドで内容を表示し,dll.txt というファイルと data, script, voa というディレクトリがあることを確かめる。 % ls perl_lesson data dll.txt script voa 以下,perl_lesson がカレントディレクトリであるという前提で話を進めるので,perl_lesson に移動しておく。 % cd perl_lesson ■1. コマンドラインでスクリプトを指定し実行する perl -e 'スクリプト' [入力ファイル] [> 出力ファイル]
RSS 2.0などで使われる日時の解析。 RSS2.0の日時(pubDate、lastBuildDate?)にはRFC#822で定められた形式が使われています。 これは可読性が高いものの時刻値同士の比較などが面倒なので、これを内部時刻値(1990/01/01 00:00:00 GMTからの経過秒数)やW3C形式に変換するために作成しました。 W3C形式の日時の解析と異なり、月やタイムゾーンの語彙が多く数値への変換を都度考えていると厄介なので、これにも触れています。 日時の記述は、以下の正規表現でパースできます。 (?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun), )?(\d{1,2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}|\d{2}) (\d{2}):(\d{2})(?::(\d{2}))? (U
Perl is often used to manipulate the HTML files constituting web pages. For instance, one common task is removing tags from an HTML file to extract the plain text. Many solutions for such tasks usually use regular expressions, which often end up complicated, unattractive, and incomplete (or wrong). The alternative, described here, is to use the HTML::Parser module available on the CPAN (http://www
Kawa.netxp [Perl] HTML::TagParser - HTMLソースの解析/属性値やinnerTextの取得 HTML::TagParser は、HTML ソースコードの解析を行う Perl モジュールです。 DOM 風のインターフェースで、各 HTML タグごとに属性値やinnerText値を取得できます。 Pure Perl 実装ですので、コンパイル不要で手軽に利用できます。 ページ中の特定のタグの内容を抽出したり、リンクを辿っていくスクリプトなどで利用できます。 Encode.pm バージョン 2.10~2.12 間で発生していた FB_XMLCREF 問題に対応しました。(2006/11/01) Encode::FB_XMLCREF でなく Encode::XMLCREF を利用します。(効果は同じです) 2.12 は既に最新バージョンではありませんが、Perl
Blog Post Featured post Sprinkle delicious dishes as a cook with gourmet cookware Continue reading Points to Note When Shopping for a Washing Machine There are different washing machines brands in New Zealand. When shopping, therefore, you need to ensure that first, you get a quality machine; a machine that will last through many years without breaking down. You check product warranties and review
HTTPヘッダーのみを取得するHEADコマンドは更新確認などに良く用いられますが、HTTP::Liteにこれを行うためのメソッドはないようです。 そこで乱暴ですが、$http->{'method'}を直接指定することでHEADを実行することができます。 use HTTP::Lite; $http = new HTTP::Lite; $http->{'method'} = 'HEAD'; $req = $http->request("http://www.cpan.org/") or die "Unable to get document: $!"; print $http->body(); 2.1.4版ではメソッドを明示的に指定できるようになったようです。 この項はいずれ改稿します。 HTTP::Liteモジュールを使った簡単なHTTPクライアントスクリプトの例です。 引数の展開や実行結
(2001-09-14 作成、2005-01-29 Wikiに移動して説明をちょっと修正) HTMLの外部リンクチェック HTMLのリンク切れを調べるPerlスクリプトを書いてみました。 開発+テスト環境は Windows2000 + ActivePerl v5.6.1-Build628、本番は Debian GNU/Linux Woody kernel 2.2.19 です。 [編集]参考文献 # 書籍 プログラミングPerl 改訂版 CPAN ActivePerl ActivePerl 付属のマニュアル (HTML) ASPN Downloads ActivePerl ASPN Reference ActivePerl Docs ASPN File::Find ASPN HTML::LinkExtor ASPN LWP (libwww-perl) ASPN LWP::Simple 河馬屋
2006年05月07日11:30 カテゴリLightweight Languages perl - DESTROYって何? Shiroさん、いい質問です。 404 Blog Not Found:perl - Yet Another Way to Add Singleton Methods ちょっと疑問。この実装で、$fooが不要になった時に$fooおよびシングルトンメソッドのsubの実体はGCされるのでしょうか。結論を先に言うと、きちんとされます。というのか、この場合それを手でやっているわけです。そして、それを手でやっている箇所がDESTROY。 sub DESTROY { my $self = shift; $DEBUG and carp "Destroing $self"; delete $Method{ $self + 0 }; } 実はこのmethodは、名前に反して「ゴミ捨て」そ
最近会社ではにわかにPHPブームが巻き起こってまして、Perlプログラマーな僕としては少々肩身が狭い思いをしたりしなかったりな状況なのです。というわけで何とか社内でのPerlの地位を守りたいのですが(笑)、僕はPHPには全くふれたことがないので、Perlの方がPHPより優れている点をぱぱっとあげることができません(汗)。そういうときのGoogle頼み、ということで「Perl PHP 比較」というキーワードでぐぐってみました、すると河合さんの河馬屋におもしろい記事を発見しました。 PHPの方が軽くて速いは本当? PerlよりPHPの方が軽くて速いは本当?(CGI編) JavaはPerlよりも比較にならないほど速い? そういえば、かなり前にこのページを見た記憶があるんですが、そのときはDBIって何?ってなレベルだったので、この記事の内容がよくわからなかったことを思い出しました。しかし、改めて読
NAME Interpolation - Arbitrary string interpolation semantics (using tie()) Version 0.71 Originaly by Mark-Jason Dominus (mjd-perl-interpolation@plover.com) Since version 0.66 maintained by Jenda@Krynicky.cz SYNOPSIS use Interpolation name => \&function, ...; print "la la la la $name{blah blah blah}"; # This is like doing: $VAR = &function(blah blah blah); print "la la la la $VAR"; DESCRIPTION
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く