Skip to Content
Perl To Python Migration
book

Perl To Python Migration

by Martin C. Brown
November 2001
Beginner
320 pages
5h 53m
English
Pearson Business
Content preview from Perl To Python Migration

BASIC STRUCTURE

Both Perl and Python share the same basic rules and layout, although there are some specific differences you need to be aware of. To recap on the major points of operation for Perl:

  • Scripts are executed sequentially, on a statement by statement basis.

  • Statements must be terminated by a semicolon, statements can be separated by new lines.

  • Blocks are delimited by braces.

  • Functions can be defined before or after you use them.

  • External modules are imported during the initial stages of execution to allow syntax and error checking (see The execution model for more information on the precise execution sequence).

Python's approach

Python follows a similar approach, although it will appear to many Perl programmers as being somewhat ambiguous: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Perl by Example

Perl by Example

Ellie Quigley
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 0201734885Purchase book