Google Groups

ancestry of perl features

Uri Guttman Jan 20, 1999 12:00 AM
Posted in group: comp.lang.perl.misc

i have been pondering perl's ancestry and for curiosity's sake i have
been thinking about which languages (if any) influenced various perl
feature. some are borrowed from one language which borrowed from an
earlier one. some are pure perl from the head of larry and his cohorts.

some are very obvious (or not). here is a starting list. feel free to
add, comment or flame.

math infix ops (+, *, /, etc)                C
exponentiation (**)                        PL/I        (others too)
math comparison ops (==, >, )                C        (others used = for ==)
assignment ops        (+=)                        C
short circuit ops (||, &&)                C        (text versions are perl)
bit ops ( |, &, ^, <<, >> )                C
auto-increment/decrement                C        (magic ++ is perl)
dereference (->)                        C         (from PL/I)
scalar range (..)                        awk        (list .. is perl)
bind (=~)                                awk
scalars as string or number                sh
arrays of scalars                        csh?        (the $a[0] syntax is similar)

tr///                                        tr, sed y (does anyone use y?)
s///                                        sed
m//                                        many unix programs (awk,sed,more,etc.)

-p option                                sed
-n option                                awk

varying lenghth strings (no \0 needed)        sh, PL/I
substr                                        PL/I

grep                                        unix
map                                        lisp
lists                                        lisp, apl
slices                                        apl
hashes                                        awk

flow control (for, while, etc)                C
foreach                                        perl
statement modifiers                        perl?

eval string                                sh
eval block                                perl

file test ops                                sh        (perl added many)
file functions                                C, unix

system call functions                        C, unix

networking functions                        C, unix

get*by* functions (gethostbyname)        C, unix

glob (<*>)                                csh

that's enough for me for now. all i can say is that larry is a high
quality thief! :-)


Uri Guttman                             Hacking Perl for Ironbridge Networks