Perl入学式 全6回のPerl入門講座。東京、大阪、沖縄、札幌で開催。(東京は4月と10月スタート、それ以外は5月スタート) YAPC::Japan Perlを軸としたITに関わる全ての人のためのカンファレンス。 東京 吉祥寺.pm 五反田.pm 大阪 なにわPerl 沖縄 沖縄.pm
*2010/08/12追記 まずはMacportsのインストール PerlのインストールにもMacportsを使うと/opt/local以下にインストールしてくれるのでオススメします。 MacのデフォルトのPerlのインストールディレクトリを汚さないですし、アンインストールやアップグレードなどのバージョン管理もできるパッケージ管理ツールです。 MacPortsとは? MacPorts(旧名DarwinPorts)というのはパッケージ管理ツールで、UNIX向けのオープンソースソフトウェアをダウンロード、configure、make、インストール、そのパッケージ使用するのに必要な他のパッケージも一緒にインストールなど面倒な作業をすべて代わりにやってくれる便利なソフト。 source: Macports – Macの手書き説明書 事前にXcodeTools、X11をMacに付属しているインストー
PadreはPerl製のオープンソース・ソフトウェア。Javaの開発というとEclipseやNetBeanを使ったり、.NETであればVisualStudioを使うなどIDEを使うことでより手早く開発が行えるようになる言語がある。いわゆるスクリプト系のプログラミング言語ではあまりIDEを用いるという文化は浸透していないように思える。とは言えテキストエディタを素のままで使うかというとそんなことはなく、ハイライト表示すると開発しやすくなるだろう。 Perl開発に適したIDE もしあなたがPerlでシステム開発を行っているなら、Padreを使ってみよう。PadreはPerl専用のIDEで開発をやりやすくする工夫が盛り込まれているソフトウェアだ。ハイライト表示はもちろんのこと、コード補完やCPANライブラリのインストールもできるようになっている。 セッションの保存、コメントのトグル、文字コード変換
Perl › here Perl5.8以降における標準的なPerlの書き方を解説します。 インターネットで検索するとPerl4のころの古い記述がたくさんあります。また書籍などの多くもPerl4の記法で書かれています。Perl4の記法は複雑になりやすく間違いを生みやすいのでこれからPerlを書く人はPerl5の現代的な記法で記述することを強くお勧めします。 strictプラグマとwarningsプラグマ (必須) strictプラグマとwarningsプラグマを有効にします。 use strict; use warnings; use strict;とuse warnings;の2行はスクリプトの最初に必ず記述してください。これらはPerlの文法チェックを厳しくするためのものです。面倒だという軽い気持ちでこれを記述しないと後々本当に面倒なことになります。 use strict;とuse wa
あれから1年 Mojoについては2009年1月1日から4回にわたって特集記事を連載しました。ちょうど執筆を開始した直後に作者リーデル氏が不幸な医療事故にあい、一時はどうなることかと思いましたが、連載を終了する直前に開発続行の宣言が出て、ほっとしたのをよく覚えています。 あれから1年。Mojoを取り巻く環境はずいぶん変わりましたが、いま、Mojoはいったいどうなっているのでしょうか。今回は今年最後の記事として、Mojo界隈の近況をお届けすることにします。 大きく変わったといわれていますが…… 昨年12月にバージョン0.9に到達したMojoは、途中事故の後遺症で開発が停滞した時期はあったものの、この1年でかれこれ30回以上のリリースが行われたことからもわかるように、いまもなお着実に開発が続けられています。この「ベータテスト」期間中にいくつか後方互換性が失われる変更があったため批判を浴びたことも
"),r.close()),!r)throw Error("base not supported");var a=r.createElement("base");a.href=n,r.getElementsByTagName("head")[0].appendChild(a);var i=r.createElement("a");return i.href=t,i.href}finally{e&&e.parentNode.removeChild(e)}}());var s=a(t||""),f=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t)
2009年03月03日19:00 カテゴリLightweight Languages perl - EncodeでXSSを防ぐ 良記事。 第7回■文字エンコーディングが生み出すぜい弱性を知る:ITpro だけど、問題点のみ具体例があって、対策にないのが片手落ちに感じられたので、その点を補足。 結論だけ言ってしまえば、Perlなら以下の原則を守るだけです。 404 Blog Not Found:perl - Encode 入門 すでにOSCONでもYAPCでも、あちこちそちこちでこの基本方針に関しては話したのですが、ここ 404 Blog Not Found でも改めて。 Perl で utf8 化けしたときにどうしたらいいか - TokuLog 改め だまってコードを書けよハゲ入り口で decode して、内部ではすべて flagged utf8 で扱い、出口で encode する。これが
Perl › よく使う関数・モジュール よく使用する関数・標準モジュールの一覧です。これらの関数を覚えておけば、Perlをより便利なものにすることができます。詳細な解説は避け、簡単なサンプルを紹介しています。戻り値のあるものについては$retという記号で表しています。 また、よく使用する特殊変数、標準モジュールについても、解説しています。各項目から、関数の詳細にもリンクしていますので、便利にご利用ください。 数学関数 文字列操作 配列操作 ハッシュ操作 ファイル入出力 ファイル・ディレクトリ操作 時刻・時間 その他の重要な関数 関数とモジュールのドキュメントの調べ方 よく使用する特殊変数 よく使用する標準モジュール 数学関数 abs 絶対値を求めるにはabs関数を使用します。 $ret = abs $num; abs(-3)は3になります。 sqrt 正の平方根を求めるには、sqrt関数を
来年も作りたい!ふきのとう料理を満喫した 2024年春の記録 春は自炊が楽しい季節 1年の中で最も自炊が楽しい季節は春だと思う。スーパーの棚にやわらかな色合いの野菜が並ぶと自然とこころが弾む。 中でもときめくのは山菜だ。早いと2月下旬ごろから並び始めるそれは、タラの芽、ふきのとうと続き、桜の頃にはうるい、ウド、こ…
2009年06月15日07:00 カテゴリLightweight Languages perl - use utf8; #って何だ? id:otsuneに建設予定フラグがたてられていたので。 冬通りに消え行く制服ガールは、夢物語にリアルを求めない。 - subtech Perl の utf8 関係が未だ全く理解できない。わからないことがわからないので整理 use utf8はいつフラグをたてるか use utf8 しててもフラグたたないことがある…… これは、以下の実例を見ていただくのが一番よいだろう。 #!/usr/bin/perl use strict; use warnings; use utf8 (); sub check_flag{ my $str = shift; print qq("$str" ), utf8::is_utf8($str) ? 'is' : 'IS NOT',
http://twitter.com/monjudoh/status/2038844182 この発言に触発されて、あると便利だよなぁと作ってみました。 とりあえずなので、上のペインで Ctrl+Enterを押すと書いてあるコードが Perlでevalされて下のペインに表示されます。選択している場合には選択していた場所だけが実行されます。機能はそれだけです。 Perlの評価部分に関しては以下の ipl.batを拝借しています。 日記帳だ! with Tux on Libserver :: irbをパクってiplを完成させてみた 以下の2つのファイルがコードの全体です。 実行するには、Perl5.10とJava6*1が必要になります。 MainFrame.java import java.awt.event.*; import java.io.*; import javax.swing.*;
2009年06月12日02:30 カテゴリLightweight LanguagesBlogosphere perl - 現代的な Perl を再習得する方法は TopHatenarでperl一位の私が来ましたよ。 現代的な Perl を再習得する方法は? - スラッシュドット・ジャパン 現代的な Perl を習得するためには、どのようなステップを踏むのが良いだろうか ? またお勧めの書籍などあったら教えて欲しい。 モダンPerlに限らず、プログラミングを再?習得するのに最適な方法、それは.... ブログに書きつづけること です。他のどんな手法もこれに勝ることはないと弾言しましょう。 以下、その三つの理由。 1. 自然にアウトプットが出来る プログラムは、言語で書きます。 書くものである以上、書かなければ覚えられません。 いくらいいソースコードを読んでも、書かなければ自分のものにはなりませ
Web Application Framework Description Ark は perl で書かれたウェブアプリケーションフレームワーク(WAF)です。 Ark はおなじく perl 製のフレームワークである Catalyst を参考に開発されており、その多くの特徴はそのまま引き継いでいます。 そのため Catalyst の経験のある開発者であればすぐに使い始めることができるでしょう。 Catalyst とのいちばんの違いは、Catalyst は実用的に運用するためには基本的に mod_perl や FastCGI など永続的なプロセス実行環境を要求するのに対し、 Ark は CGI でも実用的に動作するという点を重視して開発されています。 もちろん mod_perl/FastCGI でも動作します。 より詳しい説明はドキュメントを参照ください。 Download 現在の最新バージ
業務系アプリを書いていると、csv 出力ぢゃなくて、Excel データそのものを出力できたらなぁ・・・と思うことがあると思います。そこで、 Perl で Excel データを生成する方法と日本語を扱うときの注意点をまとめてみました。 環境構築編/必要な Perl モジュールをインストールします。 下記コマンドを root 権限のあるユーザで実行してください。 perl -MCPAN -e 'install Spreadsheet::WriteExcel' perl -MCPAN -e 'install Spreadsheet::ParseExcel' perl -MCPAN -e 'install Unicode::String' 日本語を含む Excel データの生成例 #!/usr/bin/perl -w use strict; use Jcode; use Unicode::Stri
(2005/06/19) PAR というものを使えばperlスクリプトがwindowsの実行形式(exe)化できるらしい。 仕組みはこんな感じ。 Perlインタープリタを含む必要ファイルを全てexeにまとめる(実はzip) exeが実行されると、裏で展開して、中のPerlインタープリタ(dll)でスクリプトが実行される。 なるほどなるほどー。 いちいちActivePerlをインストールして云々とかしなくても いきなり実行できちゃうようになるわけだね!すてき! ※ただし拡張子をzipに変えるだけで、中のソースが覗けるけど で、さっそく使ってみた。ちょっと苦労した! よって以下はインストールメモだ! 現在の最新版は5.8.7.813。入れちゃダメ。 素直にこれをインストールしたら最終的にPARで作ったexeを実行した時に 「プロシージャエントリポイントPL_memory_wrapがダイナミック
Perl Mongers Perl Mongers とは、日本各地に存在する、Perl ユーザーのコミュニティのことです。各種イベントが行われていますので、是非参加してみましょう。 Shibuya.pm Fukuoka.pm Kansai.pm (@kansaipm) Yokohama.pm (@yokohamapm) Hokkaido.pm (@hokkaidopm) Nagoya.pm (@nagoyapm) Kushiro.pm (@kushiropm) Kyoto.pm (@kyotopm) Kamakura.pm Niigata.pm (@niigatapm) Sendai.pm (@sendaipm) Tokyo.pm Hachioji.pm (@hachiojipm) Chiba.pm (@chibapm) Yomitan.pm (@yomitanpm) Machida.pm
最近のWebシステム開発ではキャッシュを使うケースが増えつつある。各種Webアプリケーション向けフレームワークでもキャッシュをデフォルトでサポートしているものも多く、その筆頭に挙げられるのがmemcachedだ。 top風にmemcachedのステータスが確認できる memcachedは軽量で、あると便利だと思える機能が殆ど実装されていない。ステータスを監視するような機能もないが、そこは独自に開発されたmemcache-topを使えば解決する。 今回紹介するオープンソース・ソフトウェアはmemcache-top、memcachedのステータスを表示するコマンドラインスクリプトだ。 memcache-topはPerlで作られたスクリプトで、既に立ち上がっているmemcachedサーバを一覧し、そのステータスを表示してくれる。デフォルトで3秒ごとにリフレッシュされるようになっており、topコマ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く