#!/usr/local/bin/perl -w use strict; local *FH1; local *FH2; my $source; my $target; foreach $source (@ARGV) { $target = "converted_" . $source; open(FH1, " open(FH2, ">", $target) || die "Create $target was failed.\n"; while ( ) { $_ =~ s/^,[^"]*(?=\n)$/$&"/; print(FH2 $_); } close(FH1) || die "Close $source was failed.\n"; close(FH2) || die "Close $target was failed.\n"; } exit 0;