Help for this page
if ((/#bg\s$input/ .. /#be\s$input/) =~ /^\d+(?<!^1)$/) { print $_; }
elsif (/bb\s$input/) { print $_; last; }
else { print "nope".$_; last; }