in reply to feeding a menu from script
$menu = <STDIN>; &delete_files if($menu == 1); &makdir if($menu == 2); # and so on. sub delete_files { # stuff goes here } [download]
dont know is it what you want.