2012年7月13日金曜日

開発環境

『続・初めてのPerl 改訂版』(Randal L. Schwartz, brian d foy, Tom Phoenix 著、伊藤 直也田中 慎司吉川 英興 監訳、株式会社ロングテール/長尾 高弘 訳、オライリー・ジャパン、2006年、ISBN4-87311-305-9) の3章(モジュールの使い方)、3.10(練習問題)2を解いてみる。

2.

コード(TextWrangler)

#!/usr/bin/env perl
use strict;
use warnings;
use Business::ISBN;

my $isbn = Business::ISBN->new('4873113059');
print "group code: ",$isbn->group_code,"\n";
print "publisher code: ",$isbn->publisher_code,"\n";

入出力結果(Terminal)

$ ./sample.pl
group code: 4
publisher code: 87311
$

0 コメント:

コメントを投稿