in reply to how to print only 47 and another number will rejected and when user give 47 that number only print ?
sub{print "entered $_\n" if /^47$/}->() while <STDIN>; [download]