Please read Writeup Formatting Tips and How (Not) To Ask A Question. In particular, wrap your input file in code tags, since it is getting misformatted. Also, you are binding $rrow_test to your substitution, but don't give us a value. You probably want to reformat your open statement to open FILE, "<", $file or die "Can't open $file: $!\n"; as well, but that's more subjective.