2010-08-25から1日間の記事一覧

スカラコンテキストでのglob関数の挙動がよくわからない

なんか初歩的なんですけど。以下のファイルがある状態で。 $ ls [abcd] a b c d次のコードを実行。 use warnings; use strict; my @file = qw(a b c d); print "### scalar context\n"; for my $file (@file) { print scalar glob $file; print "\n"; } prin…