Perl Programming – More Advanced Perl Programs Part 1

Perl Programming – More Advanced Perl Programs Part 1
Get the entire Perl Programming course for 20% off:
In this lecture, I’m going to show you guys more advanced Perl programs, so let me jump right into it. I’ll start off with locating where our Perl program is. #!/usr. Always remember for you Linux and Unix and Mac OS X lovers, never confuse the usr with the word user because we’re locating the direct path where our Perl program is. So after #!usr/bin/perl. Again, with this line of code, it’s just locating where our program is to use with our Perl application.
Now, in our further lectures, we’re not going to be using this line of code because I’m going to show you another way to open up our Perl applications without using this, but this is just good practice for using Unix machines and other Linux operating systems. So our next line of code, I’m going to type a print instruction and I want it to ask us what is the weather today. So in this Perl application, it’s just going to ask us the weather, and based on how hot it is or how cold it is, it’s going to tell us what type of clothes should we wear based on the weather.
So our next line, I’m going to create a container called weather. Again, all this does is it just asked us for the input or we want some data from the keyboard and we want to save that information from the keyboard into a container called weather. Again, I’ll go over this in our further lectures in explicit details. After that, I want to create some logic. I want my Perl application to have some smarts to it, some decision making. Let me take this container. I want to say if the weather is less than or equal to 60 degrees, I want to say “You should wear long pants and a long-sleeved shirt today.” Let me just give it some new lines of space I want to create more decisions because our advanced Perl program is really smart. It thinks like a human. I’m going to ask again, if the weather is greater than 60 degrees and if the weather is below or equal to 75 degrees, you should wear short pants and a t-shirt today. I’ll create another one. Just giving my Perl program some logic. You’ll get into the habit of copying and pasting because it saves you a lot of time. Let’s say it like this. Let me change the 75 to 95 degrees. Let me change this to if the weather is greater than 95 degrees, tell the user it’s too hot to leave the house. Let me save my work. Let me run it. I’ll press F5.
What do we have? What is the weather today? I’ll type a number below 60. I’ll type 50 degrees. What do we have? You should wear long pants and a long-sleeved shirt today. Let’s run it again. Let’s type a number greater than 60, so let’s just type 69 degrees. You should wear short pants a t-shirt. So it’s not too cold to wear shorts and a t-shirt today. Let’s run it again. Let me type a number greater than 95, let’s say 150 degrees. Wow! It’s too hot to leave the house. Let me show you a little bit more. Let’s give a number in between 60 and 95. Let’s just say 89 give or take. You should wear shorts and a t-shirt today. So it’s still okay to wear shorts and a t-shirt today. So I’m just showing you guys a little bit more of an advanced Perl program with a logic. So based on the user input or what we tell our Perl application, it analyzes it and it gives us a decision and an answer based on our input. That’s another more advanced program which I’m going to explain in details in our further courses.


David Shea says:

You called this advance ?

lukas1421 says:

you call this advance?

Reivivus says:

I think elsif statements after the first if makes the statement seem more eloquent.

Open Comments says:

Holy Shit, I hate this.. it is not advanced… lower than basic.. f u.. I was looking for how to map libraries and reverse engineer existing perl code.

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours