Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Perl tutorial building on Python skills?

by soonix (Canon)
on Oct 20, 2021 at 10:40 UTC ( [id://11137792]=note: print w/replies, xml ) Need Help??


in reply to Perl tutorial building on Python skills?

I don't have materials of my own, but some points: especially with a Python background, some of the differences stand out:
  • context is a concept unique to Perl, and explained very good in the corresponding chapter of chromatic's book
  • Python has an explicit Boolean data type, Perl has a boolean context
  • Python regular expressions are strings, hence different quoting, and "PCRE" are not 100% "PC".
  • last but not least: as Python only has lexical scope, it was difficult for me to understand dynamic scopes, and although there is overlap between Perl's local and computer science's local, they are not the same.

Replies are listed 'Best First'.
Re^2: Perl tutorial building on Python skills?
by LanX (Saint) on Oct 20, 2021 at 11:08 UTC
    Thanks for the valuable input of all of you , didn't have the time to reply in detail yet.

    I have to wait to meet the new colleague to assess which kind of programming/python skills be already has.

    After all Python is the new Basic, everyone claims he knows it. I don't wanna end up explaining Python to him or giving a class in language design...;)

    > "PCRE" are not 100% "PC".

    Minor nitpick. PCRE is also the name of an RE engine used by several products including PHP. Python has its own RE engine, trying to be PC

    > Differences

    More:

    • function signatures
    • Most (all?) variables are references
    • strings are immutable
    • regex are first class objects in Perl
    • list flattening/interpolation in Perl

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found