in reply to my 'if' condition doesn't work, why?
UNTESTED:
for (my $n = 0; $n < 268; $n++) { if ($n==40 || $n==47 || $n==76)) { print $n."\n"; } } [download]
Another conventional, scalable way is to store your values in a hash and use exists.