C:\>perl foreach $t (split(/,/, "foo,bar,,,,,,,,", -1)) { print "$t<br>"; } ^Z foo<br>bar<br><br><br><br><br><br><br><br><br> splitの3つ目の引数に負の数を