THAT: { # Ask for input print "What is the Part Number that you would like to look up?\n"; # Get it my $PartNumber = ; # See if it's empty print "There was no input" if ($PartNumber eq "\n"); # Execute next Block THIS: { print "What is the Revision level for $PartNumber"; my $Revision = ; # Pattern match or test until finished redo THIS if($Revision =~/rev/g); last THAT if($Revision=~/bored/g); # or Repeat the part look-up again redo THAT; } }