#This example is wearn out to the bone due to it's general use open FILE, 'data.txt' or die "Could not open data.txt: $!"; #in general, if function() returns either false or some true info: MAIN: { initialise_stuff; ask_user(); function( @_ ) or redo MAIN; .... }