環境準備から。。。と思っていたら、macだとターミナルを使っていきなりperlを実行出来る。
試しに、ターミナルを上げて perl -versionと打ってみれば使えることがわかる。
↓こんな感じ。
i000-111-22-333:~ XXX$ perl -version
This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
i000-111-22-333:~ XXX$
んで、早速Hello world的なところから。test.plというファイルに以下を書いて保存。
#!/usr/bin/perl print "Hello world\n";
i000-111-22-333:~ XXX$ perl test.pl
Hello world
i000-111-22-333:~ XXX$
ここまで、5分位。ターミナルの出力結果風にしたり、ソースコードの記述っぽくして記事作った方が時間かかったわ。
mac、開発環境として便利だな。。。
え、これだけっていうところだが今日はここまで。。
物凄く少しづつやっていきたいと思います。