while(my $line = <$info>) { foreach ($line) { chop; @vlinks = split(/:/,$_) ; print "$vlinks[0]$vlinks[2]$vlinks[3]" } }