All the Perl/Tk examples in this chapter will follow the grid layout design. The grid design uses a matrix layout, which refers to the space within the window in rows and columns. Let's take a look at a simple program that uses the Nmap command-line program, and define the callback function for a simple Scan button to print the output of Nmap into a read-only textbox widget. This example must also take user input for a hostname.
In the following screenshot, we see the entire program window:
This window is an object created using the OOP syntax and the
new()method, as follows:
my $mw = MainWindow->new( -title=>"Perl Pentest ...