Hi Monks,
I am getting the message "use of uninitialized value $freq in concatenation (.) or string at ... line 15, <$FILE1> line 1". Though, the output is correct, I am having hard time in resolving this error message. I am trying to replace ">" in the first column by "@". My code is below.
Any thoughts?
#!usr/bin/perl
use strict;
use warnings;
my $input_file="filetag1.csv";
open my $FILE1, "<", $input_file or die "Cannot open $input_file .$!";
my $output_file="file1tagmod.csv";
open my $FILE2, ">", $output_file or die "Cannot open $output_file .$!
+";
while (my $line=<$FILE1>){
chomp $line;
my($header,$tag,$freq)=split(' ', $line);
$header=~ tr/>/@/d;
print $FILE2 "$header\t$tag\t$freq\n";
}