Perl Programming
Perl Programming
Student name
Institution
Date: 7/6/2017
Identify modules from adapters.
"Win32::GUI is a Win32-arrange native graphical UI tool kit forperl. Basically, it's a XS use of
most of the limits found in user32.dll and gdi32.dll, with a challenge oriented perl interface and
an event based trade appear". (Win32::GUI,n.d). Net::SSH::Perl This module gives aperl
interface to the SSH1 and SSH2 Secure shell traditions. The module has worked in support for
both mystery key and private key affirmation, performs customized encryption of all data, and
can read an ebb and flow SSH configuration.Use this module when yourperl application needs to
interface with a SSH-guaranteed host.DBD::mysql "is theperl 5 database Interface driver for the
MySQLdatabase. In a manner of speaking: DBD::mysql is an interface among the
perlprogramming language and the MySQLprogramming Programming interface that goes with
the MySQL relational database managementsystem"( CPAN, 2017).
use Win32::GUI();
$main = Win32::GUI::Window->new(
-name => 'Main',
-width => 100,
-height => 100,
);
$main->Add Label(-text => "Scripting with Perl CSS260");
$main->ShowShow ();
Win32Win32::GUI::Dialog();
sub Main_Terminate {
-1;
}
#Using win32::GUI
output
These modules are profitable for keeping up and interfacing with thedatabase; making it
easier to invigorate and take off changes if require. DBI requires adatabase driver module to chat
with thedatabase. The driver module handles most of the bits of knowledge about interfacing
with and talking with thedatabase.
Net::SSHWin32::GUI if modules does notwant to install you can force it; by typing
while (<MYFILE>) {
chomp
chomp;
print "$_\n";
#OUTPUT
sub Print_DB_Table1 {
my($dbh) = $_[0];
my($dbTable) = $_[1];
my@data;
my$serverName;
my$ipAddress;
my$serverStatus;
my$cpuUtilization = 0;
my$memoryUtilization = 0;
my$diskFree = 0;
# Plan question...
$sth->execute( )
# segments begin at 1.
$sth->bind_col(1, \$serverName);
$sth->bind_col(2, \$ipAddress);
$sth->bind_col(3, \$serverStatus);
$sth->bind_col(4, \$cpuUtilization);
$sth->bind_col(5, \$memoryUtilization);
$sth->bind_col(6, \$diskFree);
# Perused of the records from the giventable and print them out
#print("@data");
print("$serverName \t");
print("$ipAddress \t");
print("$serverStatus \t");
on the off chance that (characterized $cpuUtilization && length $cpuUtilization > 0) {
print("$cpuUtilization \t");
on the off chance that (characterized $memoryUtilization && length $memoryUtilization > 0) {
print("$memoryUtilization \t\t");
on the off chance that (characterized $diskFree && length $diskFree > 0) {
print("$diskFree \t");
print("\n")
$sth->finish;
print("\n");
Works Cited
About tech (2017) how to read a file and write files in Perl
http://perl.about.com/od/perltutorials/a/readwritefiles.htm