#!/usr/bin/perl use strict; use warnings; my $in_file = '/path/to/in_file'; my $out_file= '/path/to/out_file'; open my $fh_in,'<',$in_file or die "$in_file: $!"; open my $fh_out,'>',$out_file or die "$out_file: $!"; while(my $line = <$fh_in>){ $line =~ tr/,/\t/; print $fh_out $line; } close $fh_out; close $fh_in;