Coding 101 21: Perl: Getting Started

Hosts: Fr. Robert Ballecer, SJ and Shannon Morse

Guest: Patrick Delahanty

Ivory Tower

Control Structures
* The structure of Perl is more like C# than Python
— While Python uses whitespace to delineate lines of code, Perl uses “;” a semicolon
— Also like C#, Perl uses “{}” Curly brackets to create BLOCKS of code

Variables
* Much like Python, Perl doesn’t require you to declare variables seperately from expressions.
* You can declare variable WITHIN the expression.

Perl offers three types of variables: Scalars, Arays and Associative Arrays
* We’re going to show you the first two: Scalars and Arrays

Printing in Perl
* Printing in Perl works much in the same way as printing in Python
* You can print numbers, strings, variables, and combinations thereof.

Scalars
* These are either numbers or strings
* Perl doesn’t require you to mark a variable as either a number or a string… it all looks the same to Perl
* Perl also doesn’t require you to differerentiate between integers and real numbers

Usage of Scalars:
* You declare a scalar variable by using “$” right befofe the name of the variable
$Var1 = 28 Creates a variable named “Var1” containing the integer “4”
$Var2 = “Coding 101” Crates a variable named “Var2” containing the string “Coding 101”
$Var3 = 3.14 Creates a variable named “Var3” containing the decimal number “4.5”

Arrays
* An array is a ONE-DIMENSIONAL indexed list of Scalar variables

Usage of Arrays
* You declare an array by using “@” right before the name of the array
* Individual scalar variables within the array can be accessed by pointing to their index with the SCALAR identifier
@C101 = (“Padre”, “Snubs”, “Bryan”) Creates an array named “C101” and fills it with the strings, “Padre”, “Snubs” and “Bryan”
@coding = @c101 Creates an array called, “coding” and fills it with the values from the array “c101”
$C101[2] = “Cranky Hippo” Changes the value in the third item in the array “C101” from “Bryan” to “Cranky Hippo”

Get in Touch With Us!

* Subscribe and get Coding 101 automatically at TWiT.tv!
* Follow PadreSJ and Snubs on Twitter.
* Watch the show live and join the chatroom every Thursday at 1:30pm PST.
* Email us at Padre@twit.tv and Shannon@twit.tv.
* Join our Google+ Community!

Bandwidth for Coding 101 is provided by Cachefly.

Running time: 42:03

Comments

robertsd247 says:

I have been coding Perl, C, VB, etc and other languages for 20+ years now. Never in my life have I seen a video that is more stupid and more annoying to watch than this one. The entire Priest thing makes this video unsuitable for children to watch. That hipster girl should exist to throw bricks at. In fact, if I could sit in the audience and throw bricks at her the entire time, THAT would be entertainment.

Perl Poetry is more tolerable than this (and that in and of itself must be destroyed, but one thing at a time).

This channel is the de facto reason WHY Adblock for Youtube was created. I will feel better as a human being that this channel did not get my view counted for this monetized piece of shit.

Alpha Strategy Group says:

i like the in video ad.

John Doyle Wagner says:

Почему девушка ведет себя тут как тупица?

Brian Moran says:

It’d be cool if the girl didn’t pretend to not know what she’s talking about all the time. I bet she’s a bamf coder.

Yilun Mao says:

can I install Perl on my D drive? I kept getting errors excuting .pl files even if I moved them into bin directory >.<

Vicky Sharma says:

next video link after this video ?

Tao Xu says:

like your program. thank you so much!

jtjohnst1965 says:

I’m ready for php now, with hopefully a smattering of mysql? 
John

21johnja says:

This is SO HELPFUL! I dont like how they pretend the woman doesn’t know anything. I know it’s acting, but why does the guy always have to be in charge?

jerster says:

The last perl tutorial I watched put me to sleep. Father Bob and Shannon actually kept me awake with their antics haha so I learned something. btw The blue curtain is gross.

Mark Mahathey says:

That’s it man

Matt Dathew says:

a programmer priest with a chic, this is so crazy

David Beiler says:

mac os ten not X

Josh Nielsen says:

This is awesome. It’s basically coding TV, and is better than most of the junk on TV anyway. This should be syndicated.

Davy M says:

Yeah man…this is frickin wierd…wtf is right…lmfao.!
And to Shannon…” ..you are definitely good to go. .:)” here anytime. Thx for the laugs

raccoonnyc says:

As a beginning art student I would often say, “I don’t know much about art but I know what I like”. As  I learned more about art, I realized the statement should have been, “I don’t know much about art but I like what I know”
I was annoyed when you dropped C++ , because that’s all I knew, but, I began to like the insight into other programming languages. Nice show!

Ittisafur Rahman says:

Already up for it :p 5:11

Hans Jurgen DomBro says:

Why is this catholic dude here, and why would anyone call this kid a father?

Flat Penguin says:

Don’t get me wrong I really enjoy the show and I think you guys are great. it’s just in my opinion I don’t think you spend long enough on a particular language. It’s like just as you get to the more interesting and advanced parts of a language you drop it and then its back to square one with learning how to install and print words etc

Wootly says:

use warnings;
use strict;

Write your perl programs again. That ain’t new baby. Completely different language afterwards, and none of your programs would have worked.

Ben Boyce says:

I just created this code and every time i run it pearl flashes and doesn’t come back up can you please tell me why?
$var1 = 123
$var2 = Jack
$var3 = Jill

print “Once upon a time $var2 and $var3 went up a ‘hill'”/n;

;

@happy = (“Jack”, “Jill”, “Ben”);

print “once upon a time @happy[0] and @happy[01] went up the hill the fetched a pail of water and brought it down to @happy[02] /n”;

;

김준웅 says:

엄청난 자료인데 한글 자막있으면 참좋겠다…

MrAllahSux says:

You guys and girls have a great site.
I got a boss that wants me to convert a bunch of BASH scripts into Perl language.
I think this course can help.
I hope the class is free.
Thanks again

gurunatha prasad says:

LOVE YOU CODING 101 <3

Alpha Strategy Group says:

Split screen output and original code please.

Ning Zhang says:

Any Perl programm should start with

use strict;
use warnings;

This will catch many common coding errors and is considered good style (for 15 years already).

Farzher says:

This is so weird, wtf!?

Programming priest coding in notepad with hipster girl being incredibly impressed by anything mentioned about pearl.

jonas steiner says:

hahahaha i don’t believe this

pimmeh - says:

Want laptop does she have? The white one?

BatteryProductions says:

common, shannon, you know this…

Black Ghost says:

Perl is very awesome I started playing with it last night. Had a lot of fun.

EagleSlightlyBetter says:

Thanks for this, folks!

Bit Flippa says:

Thanks for this Perl starter for non-programmers. One minor point is that Patrick put “#!/usr/bin/perl” as his “shebang” line at the top of the script, and then ran the script with “perl” in front of the script name. Does he realise there’s no point in doing both?

LadyHangaku says:

Thanks for showing the first steps to use perl! It helped me really much 😀

Neelakant M says:

Thank you for the great  perl video Robert and Shannon

Cheeky Nham says:

Coding for God, Fr. Robert Ballecer?  Praise Jesus C#

MrAllahSux says:

I AM TRYING  TO FIND THE BEGINNING OF THIS PERL COURSE
PART 21 SEEMS TO BE THE BEGINNING TO THIS COURSE.
ARE THERE ANY PART 1, PART 2, PART 3 ?

Ryan Kelly says:

Great job Patrick!

ambers rcell says:

This is such a nice lesson and your conversation with each other makes it entertaining.

 Write a comment

*

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

Please click below to support us on Facebook!