Categories
Perl

unless-else Statement in Perl

I wrote this simple program in Perl programming language to demonstrate how to use unless-else statement.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/


Program Listing

# unless_else_example.pl
# Author  : Jake Rodriguez Pomperada,MAED-IT,MIT
# Date    : April 26, 2020  Sunday  4:10 PM
# Email   : jakerpomperada@gmail.com
# Websites : http://www.jakerpomperada.com
#            http://www.jakerpomperada.blogspot.com

print "\n\n";
print "\tunless-else Statement Example ";
print "\n\n";
print "\tGive a Number : ";
chomp($num=<>);
print "\n"; 
unless($num>=200) {
   #This print statement would execute,
   #if the given condition is false
   printf "\tThe given number $num is less than 200.";
}
else {
   #This print statement would execute,
   #if the given condition is true
   printf "\tThe given number $num is greater than or equal to 200.";
}
print "\n\n";
print "\tEnd of the Program";
print "\n\n";

Categories
Perl

Relational Operators in Perl

I wrote this simple program using Perl programming language to show you how to declare and use relational operators in Perl.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Sample Program Output
$a = 32;
$b = 11;

print("\n");
print ("\tRelational Operators in Perl");
print("\n\n");
print("\tValue of \$a = $a and value of \$b = $b\n");
if( $a == $b ) {
   print("\t$a == \$b is true\n");
} else {
   print("\t\$a == \$b is not true\n");
}

if( $a != $b ) {
   print "\t\$a != \$b is true\n";
} else {
   print("\t\$a != \$b is not true\n");
}

$c = $a <=> $b;
print("\t\$a <=> \$b returns $c\n");

if( $a > $b ) {
   print("\t\$a > \$b is true\n");
} else {
   print("\t\$a > \$b is not true\n");
}

if( $a >= $b ) {
   print "\t\$a >= \$b is true\n";
} else {
   print("\t\$a >= \$b is not true\n");
}

if( $a < $b ) {
   print("\t\$a < \$b is true\n");
} else {
   print("\t\$a < \$b is not true\n");
}

if( $a <= $b ) {
   print("\t\$a <= \$b is true\n");
} else {
   print("\t\$a <= \$b is not true\n");
}

Categories
Perl

Assignment Operators in Perl

I wrote this simple program using Perl programming language to show you how to declare and use assignment operators in Perl.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Sample Program Output

$a = 25;
$b = 8;

print("\n");
print ("\tAssignment Operators in Perl");
print("\n\n");
$a += $b;
print "\t\$a += \$b  = ",$a,"\n";
$a -= $b;
print "\t\$a -= \$b  = ",$a,"\n";
$a *= $b;
print "\t\$a *= \$b  = ",$a,"\n";
$a /= $b;
print "\t\$a /= \$b  = ",$a,"\n";
$a %= $b;
print "\t\$a %= \$b  = ",$a,"\n";
$a **= $b;
print "\t\$a **= \$b = ",$a,"\n";


Categories
Perl

Arithmetic Operators in Perl

I wrote this simple program using Perl programming language to show you how to declare and use arithmetic operators in Perl.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Sample Program Listing

$a = 10;
$b = 2;

print("\n");
print ("\tArithmetic Operators in Perl");
print("\n\n");
print("\t\$a+\$b = ",$a+$b,"\n");
print("\t\$a-\$b = ",$a-$b,"\n");
print("\t\$a*\$b = ",$a*$b,"\n");
print("\t\$a/\$b = ",$a/$b,"\n");
print("\t\$a%\$b = ",$a%$b,"\n");
print("\t\$a**\$b = ",$a**$b,"\n");

Categories
Perl

Two-Dimensional Array Example No.Two in Perl

I wrote this program to show and demonstrate how to declare and use a two-dimensional array using the Perl programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/


Program Listing
two_dimensional.pl

# two_dimensional_example_two.pl
# Author    : Jake R. Pomperada,MAED-IT,MIT
# Date      : April 12, 2020   Sunday  9:12 AM
# Location  : Bacolod City, Negros Occidental
# Email     : jakerpomperada@gmail.com
# Websites  : http://www.jakerpomperada.com
#             http://www.jakerpomperada.blogspot.com

# A two-dimensional array consisting of 4 rows and
# 4 columns.

@array=(
       [1,2,3,4],
       [2,4,6,8],
       [3,5,6,8],
       [4,5,6,7],
       [5,6,7,8],
     );

printf("\n");
printf("\tTwo-Dimensional Array Example No.Two in Perl");
printf("\n\n");
# Display array elements values 
# of two-dimensional array

foreach my $row ( @array ) {
    printf("\t");
    print("@$row\n");
}

printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
Categories
Perl

Math Calculator in Perl

I wrote this simple program that I wrote that I called Math Calculator in Perl programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Program Listing

<html>
<head>
<title>Math Calculator in Perl</title>
</head>
<style>
  body {
   font-family: arial;
   font-size: 18px;
   font-weight: bold;
 };
</style>
<body>
<h3> Math Calculator in Perl </h3>
<table border="0">
  <tr>
    <td align="center"></td>
  </tr>
  <tr>
    <td>
      <table>
        <form method="post" action="\cgi-bin\form.pl">
        <tr>
          <td>First Number</td>
          <td><input type="text" name="val1" size="5"></td>
        </tr>
        <tr>
          <td>Second Number</td>
          <td><input type="text" name="val2" size="5"></td>
        </tr>
           <tr></td>
		   <tr>
          <td></td>
		  <tr></td>
		  <tr></td>
          <td align="right"><input type="submit" name="submit" value="Compute"></td>
        </tr>
        </table>
      </td>
    </tr>
</table>
</body>
</html>
















Categories
Perl

Login System in Perl and MySQL

I wrote this login system using Perl programming language and MySQL database I try to search this code over the Internet but unfortunately, I can’t found any so I decided to write one. I hope this can help you learn database programming and security using Perl and MySQL.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

# login.pl
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 21, 2020   Tuesday   4:25 PM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Websites : http://www.jakerpomperada.com
#            http://www.jakerpomperada.blogspot.com


# Login System Using Perl and MySQL Database


use DBI;

$myConnection = DBI->connect('DBI:mysql:login:localhost','root','');

sub get_pword {
    use Term::ReadKey;

    my ($prompt) = shift; 
    my $pword;
    my $key;
    local $| = 1;  
    print "$prompt: ";
    ReadMode 4;   
    while( 1 ) {
        while (not defined ($key = ReadKey(-1))) { }
        if(ord($key) == 13) {
            print "\n";       
            last;            
        }
        print '*';
        $pword .= $key;
    }
    ReadMode 0; 
    return $pword; 
}


back:
printf("\n\n");
printf("\t\t===== LOGIN SYSTEM IN PERL AND MYSQL =====");
printf("\n\n");
printf("\t\tCreated By: Mr. Jake R. Pomperada,MAED-IT,MIT");
printf("\n\n");
print "\tEnter Username   : ";
chomp($name =<>);

printf("\n");
my $pass = get_pword("\tEnter Password   " );

$username= lc $name;
$password = uc $pass;


my $sql = q{
   SELECT COUNT(*) 
   FROM users 
   WHERE username = ? and 
         password = ?
};

if (($myConnection->selectcol_arrayref($sql, undef, $username, $password)->[0] == 1)) {
	 printf("\n\n");
     printf("\tUsername and Password Accepted. Welcome to the System.");
} else {
     printf("\n\n");
     printf("\tUsername and Password is Not Correct. Please Try Again.");
     goto back;
}
printf("\n\n");
# End of Code 



-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2020 at 11:57 AM
-- Server version: 5.6.11
-- PHP Version: 5.5.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `login`
--
CREATE DATABASE IF NOT EXISTS `login` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `login`;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(15) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`) VALUES
(1, '123', '123'),
(2, 'admin', 'admin');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Categories
Perl

Running Sum of Numbers Using Until Loop in Perl

I wrote this program to ask the user to give a series of numbers and then the program will compute the running sum of numbers using until loop in Perl programming language,

I wrote this math functions in C++ to help my friend in his C++ class I hope you will fund this math machine problem functions useful.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

# sum_until.pl
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 6, 2020   Monday  5:51 AM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Website  : http://www.jakerpomperada.com
print("\n");
print("\tRunning Sum of Numbers Using Until Loop in Perl");
print("\n\n");
$num_val = 1;

until ($num_val >= 11) {
 print("\tGive Value in Item No. $num_val: ");
 chomp($num=<STDIN>);
 
 $sum = $sum+$num;
 $num_val++;
}
print("\n");
printf "\tThe total sum is $num_val.";
print("\n\n");
print("\t\tEnd of Program");
print("\n\n");
Categories
Perl

While Loop in Perl

A simple code in Perl that I wrote that shows how to declare and use while loop statement.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing


# While Loop Example No. 1 Perl
# Author   : Jake R. Pomperada,MAED-IT,MAIT
# Date     : April 4, 2020   Saturday  7:34 PM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Website  : http://www.jakerpomperada.com

$test = 1;

print("\n");
print("\tWhile Loop Example No. 1 in Perl");
print("\n\n");
while ($test <= 5)
{
 print "\tStill Counting at $test. \n";
 $test++;
}
print("\n");
print("\tEnd of Program");
print("\n\n");
Categories
Perl

Odd and Even Numbers Using Do While Statement in Perl

I wrote this simple Perl program that will ask the user to give a number and then the program will display the list of odd and even numbers using do while loop statement.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

# odd_even_do_while.pl
# It will ask the user to give a number and then the program
# will display the list of odd and even numbers using do while
# loop statement.
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 5, 2020   Sunday  8:24 PM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Website  : http://www.jakerpomperada.com

print("\n");
print("\tOdd and Even Numbers Using Do While Statement in Perl");
print("\n\n");
print("\tGive a Number : ");
chomp($num=<STDIN>);
print("\n");
for ($i=0; $i <= $num; $i++) {
    if ($i % 2 == 0) {
	    print "\t$i is an EVEN Number.";
	    print "\n";
        }
    else {
 	print "\t$i is an ODD Number.";
	print "\n";
    }
}  
print("\n");
print("\t\t\tEnd of Program");
print("\n\n");