in reply to Re^6: Practicing with files
in thread Practicing with files

I don't want the if $_ stop only on one line, I want it to loop every line before it goes to else

I found my solution, had to add this to match it more than once.

if ($_ =~ m/([$ans]+)/) {