Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6368671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:42:19+00:00 2026-05-25T00:42:19+00:00

#!/usr/bin/perl use warnings; #WINDOW 1 system (dialog –keep-window –menu Customize 10 70 50 ‘Flush

  • 0
#!/usr/bin/perl
use warnings;
#WINDOW 1
system ("dialog --keep-window --menu Customize 10 70 50 'Flush rules' 'Clear all the rules' 2> /tmp/customize.txt ");
open FILE4, "/tmp/customize.txt" or die $!;
     chomp(my $customize = <FILE4>);
           if($customize =~ /Flush rules/){
           `iptables -F`;
           system ("dialog --infobox 'All tables have been flushed.' 05 35");
           }
           else{
               exit;
           }

When the above code is executed then a dialog box appears which shows an option to flush rules. When I press Enter the command iptables -F executes and it flushes all the iptables rules. After that the program terminates. I want that after flushing all the rules the window which came in starting i.e which gives the option to flush rules should not close. The program should not terminate after flushing the rules. It should come back to the window1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:42:20+00:00Added an answer on May 25, 2026 at 12:42 am

    How about surrounding it with:

    while (1)
    {
         #WINDOW 1
         ... rest of program
    }
    

    You could add an exit option to the dialog box and have break the while loop when that option is chosen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#!/usr/bin/perl use warnings; system (dialog --menu Customize 10 70 50 'Flush rules' 'Clear all
#!/usr/bin/perl use warnings; while(1){ system ( dialog --menu Customize 30 80 60 . 'Show
#!/usr/local/bin/perl use strict; use warnings; system(cd $PATH /usr/bin/sftp mysite.com <<!EOF put sample.txt bye !EPF);
Consider: #!/usr/bin/perl use strict; use warnings; my %hash; foreach (1 .. 10) { $hash{$_}
i have something like: #!/usr/bin/perl use strict; use warnings; use CGI::Simple; use DBI; my
This code triggers the complaint below: #!/usr/bin/perl use strict; use warnings; my $s =
is there a way to get with printf colored output? #!/usr/bin/perl use warnings; use
!/usr/bin/env perl use warnings; use strict; my $text = 'hello ' x 30; printf
Which version would you prefer? #!/usr/bin/env perl use warnings; use strict; use 5.010; my
I have this piece of script : #!/usr/bin/perl use strict; use warnings; use Data::Dumper;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.