my $button2=$thistab->Button(-text => 'Save', -background => '#00FF00', -foreground => 'black', -command => sub { open(NMAPFD, ">nmap.config"); print NMAPFD "$nmap_file_loc"; close(NMAPFD); $tabsinside->delete($nb->info("active")); } )->pack(-side => 'right', -pady => 2, -anchor => 'e');