HomeОбразованиеRelated VideosMore From: LearnToProgram: Become a Web or Mobile Developer

Perl vs. Python

426 ratings | 100532 views
http://www.frameworktv.com | LearnToProgram is now Framework. Visit and join for free daily videos teaching digital skills like coding and design. SUBSCRIBE TO THE FRAMEWORK CHANNEL http://www.youtube.com/subscription_center?add_user=UC4msOaZNMfPwMe_ztV5jFH SUBSCRIBE TO OUR EMAIL LIST (LEARN FOR FREE!) http://www.frameworktv.com/?src=YOUTUBE In this episode of QuickBytes, your host Mark Lassoff explains the difference between the Perl and Python programming languages. The pros and cons of each language are demonstrated in the form of examples. VISIT US ON FACEBOOK https://www.facebook.com/frameworkTechnicallySpeaking/ FOLLOW ON TWITTER https://twitter.com/fw_social INSTAGRAM https://www.instagram.com/frameworksocial/
Html code for embedding videos on your blog
Text Comments (99)
Gregory Glavinovich (11 days ago)
Based on C. Python. SUPER
Serhii Cho (17 days ago)
I thought only my grandma is using Nano
suscriptor aburrido (3 months ago)
En español joder que no es tan dificil
Noah Elekhtra (4 months ago)
for i in range(10): # we can call i whatever we want in range means as written then range(10) is 9 times because range(x) where x - 1 for result print(f"This is called the 'for loop ', repeated {i} times... Round and Round") # this is how I would've done it for small project. outcome: This is called the 'for loop ', repeated 0 times... Round and Round This is called the 'for loop ', repeated 1 times... Round and Round This is called the 'for loop ', repeated 2 times... Round and Round This is called the 'for loop ', repeated 3 times... Round and Round This is called the 'for loop ', repeated 4 times... Round and Round This is called the 'for loop ', repeated 5 times... Round and Round This is called the 'for loop ', repeated 6 times... Round and Round This is called the 'for loop ', repeated 7 times... Round and Round This is called the 'for loop ', repeated 8 times... Round and Round This is called the 'for loop ', repeated 9 times... Round and Round
Michael Molter (6 months ago)
His Python example is literally painful. Who writes Python like that? Yuck!
rayscr (7 months ago)
2:59 Was that koding.com ? Is it still the same, or is it something different? :/ Tnx!
Un Cryptyd (7 months ago)
Great video, very explanatory. Only issue with it is that Python isn't that much younger, only about two years, but other than that this was a very helpful video.
jonas steiner (8 months ago)
Perl is faster, and Python for kids
Kartik Angadi (9 months ago)
system.out.println("nano sucks! \n");
Michael Lau (9 months ago)
I can not think of a slower way to develop and test code than to use nano... manually saving ... running with what ever program ... reopen txt editor. LearnToProgram(WithMaximumCringe).tv
The idea isn't to speed through the code, but to work at a speed in which beginners can follow what we're doing. If you are already a developer, this channel isn't for you. Sorry for the speed, Michael.
低いLo (10 months ago)
This is trash. I stopped watching when I saw nano.
thanks a lot of...can you please advice me witch language can i start to learn PERL or PYTHON? i am confused.and i want to learn some language for hacking :) thanks a lot of sir
The Rarest Gamer (10 months ago)
Python > Perl
Mr Darky (9 months ago)
The Rarest Gamer Both works.
kpanat (1 year ago)
Я уверен, что со временем Perl одолеет Python... Но не на данный момент! Слишком неплох этот стиль. Сравнивать его с тупым Python-ом глупо. Он ужаснее во всех отношениях не считая 1-го, неплохой реализацией ООП в Python-e. Но это превосходство очень непонятно. Я не поклонник ООП и не считаю, что его нужно пихать куда нужно и куда не нужно. задач под ООП не этак уж и немало. Многие задачки имеют потоковый нрав. Тут ООП лучше не пихать. Но нас весьма длительно зомбировали мыслями ООП и многие даже не представляют для себя будто это без него. Согласен, ООП комфортно, однако за это нужно недешево выплачивать. Оно того не стоит. Но нередко ООП создаёт визави неудобства, в особенности при модификации. Это всё отлично понятно. Салва богу что кончилась эта безудержная пропаганда ООП! это будто и с goto. Но не желаю развивать эту дискуссию. Я не охотник goto, однако этак же и не соперник. Это обычная комманда. И она интенсивно использовалась в таких языках будто Фортнан, там был достаточно развитый синтаксис направленный конкретно на комманду goto. Это было не одинешенек десяток лет и никто вовек не ругал эту комманду, покамест не появился Бейсик... И здесь такое началось! О кошмар... Десятки статей о вреде goto методах и трюках выбросить его там, где его применение вобщем-то даже отлично. Но пошли далее разработали языки в которых дудки goto в принципе. И позже лишь сообразили, что напрасно... И даже стали разъяснять отчего в неких варианта goto совсем не худо, а визави добро и даже улучшает стуктуру программки. Вот этак... с чем боролись на то и напоролись! Потому что боролись-то с ветряными мельницами! Сама вина по которой война начата была самоликвидировалась когда вышла новенькая гипотиза Бейсика. Так дело то было не в goto а в нехорошем Бейсике... для чего тогда пробовали искоренить эут комманду в др языках неясно...
Shanu Khera (1 year ago)
someone who uses nano, instead of vi or emacs is not a coder.
Tim Meurer (2 months ago)
Shanu Khera First thought ^^
Alexander Búfalo (1 year ago)
PRINTF to use the /n /anything. Does not use print for that.
line 1: `i =0` line 4: `i=i+1` pep8 is also part of Py
JointhjfuyFullHour (1 year ago)
Mastering Perl Scripting Learn more here!... https://twitter.com/IbexMarketing/status/820080059956371456
George Wang (1 year ago)
In terms of capability of which each can achieve (Perl vs Python), what is it like for each? Just looking at this video I like how Perl looks a lot more like C. But I have also seen a handful of Python videos and the available Python libraries are so convenient I love them.
Mr Darky (9 months ago)
George Wang Modern Perl as in 2018 is capable of doing everything Python can do. Python have Pypi, Perl got CPAN. Python have Django and flask. Perl got Catalyst and Mojolicious. Python have numpy and biopython, Perl got PDL and Bioperl. Python have pygame, Perl got SDLx, Python have an interactive interpreter, Perl have Devel::REPL. Perl have pydoc which in this case I found horrible for beginners to use and instead recommend them to use Zeal or read from online python doc, and Perl have perldoc which I envy the ease of usage and the topics it covers. Perl are great at system automation and text processing, doing good at web development and just fine at desktop application programming. However, currently it is somewhat weak at Big Data and Machine Learning arena. Other than that, both are equivalent in technical capability and Python obviously is better with communith size and commercial support availability.
Albus Scheiwolka (1 year ago)
You mean that python is less than perl because it needs indentation? While indenting is (I believe) the most necessary part in writing script because it looks cleaner and is better in comprehending? I'm somehow trying to teach myself python and I have zero experience with perl so this is just out of curiosity.
Die, Master Monkey (1 year ago)
Albus Scheiwolka Wait till your whitespace is broken by some data transmission or encoding subtlety and you'll see why indentation shouldn't probably be part of syntax. ;-)
Bluebrain (1 year ago)
You did not show the difference of these two languages! You just pointed out the difference of writing code blocks. Tab-indentation vs. brackets.
Mr Darky (9 months ago)
Bluebrain You clearly said it was a difference though. So he is right.
you like python! me too but you shouldn't say python is more modern than perl things that way, it confuses people since both are old. it confusing people. they are both useful
Akash Singh (1 year ago)
Sorry but this was such a dumb video 🙈
Piotr Fidler (1 year ago)
you are presenting only one of lots of differences between those two programming languages, so this video has questionable usability
Rocco Di Russo (1 year ago)
can i ask u one thing, but what is the site u use in the video?
Steffen Schmidt (1 year ago)
really didnt learn much from this
Brieara Huff (2 years ago)
" *Edureka's Mastering Perl Scripting course aims to make you an expert Perl developer and enables you to develop useful applications which are used in the industry very often start here! .* http://shrsl.com/?~cmke
DANzwKU (2 years ago)
anyone here from Blindspot?
rushy scoper (2 years ago)
how about when she said i write a gui tracking ip program in VB lol like why wtf hollywood never try to be nerdy again
Leverquin (2 years ago)
why this videos sucks?!
Perl was started in 1987, Python in 1989 ... so not much younger :)
scifino1 (4 months ago)
I guess Python's somewhat eccentric syntax makes Java's syntax, which is more C-like, look oldschool.
Un Cryptyd (7 months ago)
I was just thinking that watching this
kpanat (1 year ago)
Питон интенсивно стал употребляться лишь в последние 10 лет...А когда вышла 1-ая гипотиза не имеет значения. Перл в отличие от Питона всё это пора не лишь интенсивно употреблялся однако этак же интенсивно развивался и совершеноствовался. Последнее в особенности принципиально. в нём обмыслена и оптимизирована любая деталь. перл будто сложным для осознания. Но по нему кушать весьма отличные учебники. Для Питона таких дудки. И вообщем быстродействие Перла в 1000 один резвее Питона. О каком сопоставлении потом этого можно гласить?! Он только малость резвее самой тормознутой Явы...
Mathieu Clement (1 year ago)
Wasn't Python released in 1992? But indeed. It's amazing to see the people who think "Python is new". A lot of people think it's newer than Java, which makes me laugh.
BudgetDude (1 year ago)
scrolled down to find this :P
Thorkil Værge (2 years ago)
You are using dynamic scoping variables in Perl. Why would you do that?
volintine (2 years ago)
What is the name of code editor that you were using?
Alejandro Guajardo (2 years ago)
nano
lalal (2 years ago)
lol?
Greater Guangxi (2 years ago)
+volintine the editor inside the virtual environment is GNU nano
volintine (2 years ago)
+Jake Davis okie thnx mate
Jake Davis (2 years ago)
+volintine It isn't really a code editor but he's using http://koding.com
Philippe Neron (2 years ago)
great example...thanks
Sjwaria Law (2 years ago)
So basically Python is much simpler and cleaner to use.
Mr Darky (9 months ago)
As a Perl developer, I agree with this subjective matter. Again, for beginners it is simple and easier I would say. For programmers who want to get the job done without the language standing in your way, others might be better.
Knives (2 years ago)
+Wynn I disagree
Subbusainath Rengasamy (3 years ago)
Mr.lassoff python is way better than perl instead of doing some old school stuff in typing python has some simple typing language no need to use some $() signs blah blah:p thank u for briefing thid in smile face and ease way .... !!!! have a great day...:)
Mr Darky (9 months ago)
Subbusainath Rengasamy That what makes it more strongly typed than PHP for example. You'll know what kind of aggregate or scalar type the variable is holding.
Shashank Gupta (3 years ago)
You smile too much dude.
RusFedor (3 years ago)
time php test.php Hello real    0m0.037s user    0m0.028s sys     0m0.008s time python test.py Hello real    0m0.030s user    0m0.024s sys     0m0.004s time perl test.pl Hello real    0m0.006s user    0m0.000s sys     0m0.000s time bash test.sh Hello real    0m0.004s user    0m0.000s sys     0m0.000s time ./test.cpp Hello real    0m0.003s user    0m0.000s sys     0m0.000s time ./test.c Hello real    0m0.002s user    0m0.000s sys     0m0.000s time ./test.asm Hello real    0m0.001s user    0m0.000s sys     0m0.000s
kpanat (1 year ago)
Я не заню ничего ужаснее PHP...
Die, Master Monkey (1 year ago)
RusFedor True dat, same as ever!
bc10000 (1 year ago)
Nice , I know assembly, C and C++ and I am proud.
Thezero6 (2 years ago)
+RusFedor use pypy
Blake Martin (2 years ago)
+RusFedor what was this test? This looks great for perl.
MisterSheep (3 years ago)
your face is funny
Sheldon Gregward (3 years ago)
he's hilarious, that sneaky but goofy face. I like him. :)
Linexust Jk (3 years ago)
+TeleTubbie Luver how relevant is that here.
Matt Oates (3 years ago)
Yeah 4 years different between the creation of Perl and Python. Give me a break. Python is just as old, it's just newer to being :cool:
Mr Darky (9 months ago)
Matt Oates Nah, it is just way more popular among beginners. There are some beginners I've met taunted Elixir as old junk compared to Python. It is like fashion.
Awesome vid!!
Kent Fredric (3 years ago)
Tips: All Perl code written since 2000 should begin with "use strict; use warnings". Not having these in advice to new users is detrimental because those statements help new users the most. ( Sadly, they're necessary for backwards compatibility reasons ). Then the bad form of declaring "$i" without "my" would be more apparent. Sure, it may be extraneous to the comparison, but people will try to learn from these examples, and teaching bad practices is ill advised.
Rajendra Prasad matcha (3 years ago)
Thank you sir
+Rajendra Prasad matcha You are welcome
Jeff Speer (4 years ago)
I am currently learning the basics with C and I was wondering if it was a wise choice considering lots of people recommend Pythons as the first language to learn. Any advice appreciated.
Jose Quesada (1 year ago)
Python Python Python Python Python!!!! You will have a much harder time understanding C. Not that it's not simple; just that for beginners, it is not intuitive.
Flash Man (4 years ago)
Mike Lassoff looks like he could kill a deer a mile away just with his mind.
Landon J Powell (2 years ago)
He looks like he could retract his head into his torso and then ram through walls and shit.
+Flash Man You're confusing Mark and Chuck Norris!
Adam Rakowski (4 years ago)
I am agains talking about languages as about their syntax. A differences in languages are about ideas and paradigm implementation details, not syntax. Assume that you have an list of numbers: arr = [1, 4, 12, 87, 31, 21, 19, 11, 90, 13] How would you multiply all odd numbers in this array? Python has some elements of functional programming. Take a look: import operator reduce( operator.mul, filter( lambda x : x%2==1, arr ) ) That's it! This could be the difference between Python and [whatever you wish]
technoway (4 years ago)
I have written many scripts in Perl and Python. For most things, I prefer Python. Google "Perl python Eric Raymond" (without the double quotes). He summarizes his experience as an experienced Perl programmer who learned Python. To summarize, even though he knew Perl for years, in just 6 days he could an error free program in Python that he would have to debug in Perl.
Mr Darky (9 months ago)
Yeah, when ER still in the era when there is no Perl Best Practices, no recommendation of use strict; use warnings;, when Perl basically still in hype and dark age. Modern Perl as in 2018 is mature, capable (with CPAN to boost the practicality of course) and most of the major bugs has been ironed out, has Moose/Moo for simple object system interface, have good web frameworks and most of the common surprises back then has been documented for future users or just been removed.
Ron Abraham (4 years ago)
also Google Perl Larry Wall "Why Perl is like a Human Language" the purpose of perl was initially to capture the space between shell and C. the problem with new languages is that they are intelligent quantitatively, but the community is fresher and have less experienced hackers than the perl kind. Its  the community ultimately that makes the difference as you can do anything in any language. Perl to date , is still a very much hackers language, which for an existential purpose, is innovating towards new ideas and paradigms. Its a big boat which moves slowly while python might be compared to an agile swanky ship.   Perl promotes the hacker culture in the new internet paradigm like no other language, except maybe C.
Albert Winston (4 years ago)
What the hell? foreach (1..10) {     print "This iteration is $_\n", "Round and Round"; }
Mr Darky (9 months ago)
In Perl 5.10+, you can use say to implicitly add newline instead of print. A good way to write above Perl is use strict; use warnings; use feature 'say'; # or use v5.10 foreach my $x (1..10) { say "This iteration is $x"; say "Round and round."; } It is perfectly fine to be explicit and you absolutely can make your Perl code pythonic or slightly verbose and readable in general. In fact, you are recommended to write maintainable code nowadays and Perl code golfing is seldom to be promoted as a way to show the power of Perl anymore. If anything, it is CPAN and the toolchains that should be taunted for its maturity and reliability.
Kai Bergmann (11 months ago)
[print ("This is iteration", i, "Round and Round") for i in range(1,11)] (Python 3!)
Reivivus (1 year ago)
I can save 4 letters! for (1..10) { # A foreach loop is just extra typing for a for(). print "This iteration is $_\n", "Round and Round"; }
orangetinyterrors (3 years ago)
+Albert Winston for n in range(10): print('This is iteration ', n) print('Round and Round')
Stephan Wagner (4 years ago)
+Albert Winston in the video he forgot as well, and he teaches others... print "this is iteration $_\nround and round\n" foreach (0..9); or: say "this is iteration $_\nround and round" foreach (0..9); would be shorter, just perl-golf it
Astro Code (4 years ago)
in contrast python is the best beginning language for beginners
Astro Code (4 years ago)
Perl is just really open to everything i prefer perl
Mr Darky (9 months ago)
Malachi Wadas "Perl is my virtual machine, CPAN is my language." - mst
Malachi Wadas (4 years ago)
How so?
Fernando Guerrero (4 years ago)
Less is more. With python is clean and clear
Mr Darky (9 months ago)
Yomi Seño *zealots* are more sensitive.
Yomi Seño (1 year ago)
So Python is more sensitive than Perl is?
Reivivus (1 year ago)
Actually R can do that pretty well, too. > n = 5; > 1:n [1] 1 2 3 4 5 # where [1] is a list of one object, not important. I can even print the numbers in reverse order n:1, and then reverse that to print them in ascending order. > rev(n:1) [1] 1 2 3 4 5
Brad Gilbert (3 years ago)
That is a tired old saying. Perhaps you could find a saying from this century. How about: Perl gives you enough freedom to shoot yourself in the foot. ( of course if you have a rabid animal chewing on said foot, that would be a good thing )
Brad Gilbert (3 years ago)
One of the reasons I didn't start programming in Python is that it seemed like a movie prop, or a toy.  Every time I want to do something slightly differently, the language actively forbids it. By Perl allowing me to write code differently, I can write it in a way that makes the important parts stand out, and make the minor things nearly disappear. One of the things I really like in Perl is all of the code I don't have to write, for example if I want to print all of the numbers from one to $n each on its own line  it is as simple as `say for 1..$n;` I doubt that could be made any clearer to me if it were written any other way, or in any other language. ( I know it is almost impossible to write it any shorter in any other language, except in some code golf language ) I will grant you that it seems magical at first, but after you realize that there is an unseen variable being used named $_, it seems a lot less magical. I totally agree that Python is a smaller language that is perhaps easier for people to learn, but after you've learned it everything you write becomes rote, because there is almost literally one way to do it. Writing in Perl, there is always new and interesting ways to write your code that no one has figured out yet, some of which makes your code easier to read and understand. This flexibility unfortunately does mean that new Perl programmers are less likely to be writing in the most clear way, but does allow them to write their code in the way that comes to them first.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.