RosettaCodeData/Task/Tokenize-a-string/Perl/tokenize-a-string-3.pl

11 lines
208 B
Perl
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
BEGIN { $/ = "\n"; $\ = "\n"; }
LINE: while (defined($_ = <ARGV>)) {
chomp $_;
our(@F) = split(/,/, $_, 0);
$" = '.';
$_ = "@F";
}
continue {
die "-p destination: $!\n" unless print $_;
}