Hi, thanks for the answer. If I execute ./example.pm (your sample code) for the second time, my $top = MainWindow->new( ); is again executed. Iam not using $top that I created before or? my problem is exactly this. my code will be fully recreated. i will lose my $top. i can save the $top hash to a file but I don't know to recreate the $top reading from the file, if this could be a solution.