# encoding: Cyrillic # This file is encoded in Cyrillic. die "This file is not encoded in Cyrillic.\n" if q{あ} ne "\x82\xa0"; use Cyrillic; print "1..3\n"; my $__FILE__ = __FILE__; $text = 'IO.SYS:225558:95-10-03:-a-sh:optional'; local $^W = 0; # 7.7 split演算子(リストコンテキスト) @_ = split(/:/, $text); if (join('', map {"($_)"} @_) eq "(IO.SYS)(225558)(95-10-03)(-a-sh)(optional)") { print qq{ok - 1 \@_ = split(/:/, \$text); $^X $__FILE__\n}; } else { print qq{not ok - 1 \@_ = split(/:/, \$text); $^X $__FILE__\n}; } # 7.7 split演算子(スカラコンテキスト) my $a = split(/:/, $text); if (join('', map {"($_)"} @_) eq "(IO.SYS)(225558)(95-10-03)(-a-sh)(optional)") { print qq{ok - 2 \$a = split(/:/, \$text); $^X $__FILE__\n}; } else { print qq{not ok - 2 \$a = split(/:/, \$text); $^X $__FILE__\n}; } # 7.7 split演算子(voidコンテキスト) split(/:/, $text); if (join('', map {"($_)"} @_) eq "(IO.SYS)(225558)(95-10-03)(-a-sh)(optional)") { print qq{ok - 3 (void) split(/:/, \$text); $^X $__FILE__\n}; } else { print qq{not ok - 3 (void) split(/:/, \$text); $^X $__FILE__\n}; } __END__