use strict;
use warnings;
#open my $infile, '<', 'filein.csv' or die "error opening infile $!";
open my $outfile, '>', 'fileout.csv' or die "error opening outfile $!";
#while (<$infile>) {
while (<DATA>) {
chomp;
my @fields = split /,|\|/, $_;
print $outfile join(',', @fields), "\n";
}
close $outfile;
#close $infile;
__DATA__
street 1,chennai
street 2|chennai
street 3|chennai
street 4,chennai
No comments:
Post a Comment