The irony is that Perl itself is a subset of UNIX features condensed into a quick-and-dirty scripting language. In a literary light, if UNIX is the Great Novel, Perl is the Cliffs Notes.
- Thomas Scoville, "
The Elements of Style: UNIX as Literature"
Care to discuss?
ETA, 20:30 CST: Also, any advice on
Wikination and
bootable CD burnination?
-
(
Read more... )
Comments 5
Reply
I first learned perl from Nathan Dale Gettings, one of my programmers at the Beckman Institute, along with alpenglow. I spent about a few weeks to pick up the scripting, regexp, array/hash, and string-centric features of Perl 4, along with its function calling syntax. Unix system hooks and the rest came later ( ... )
Reply
One of the things that made me happy about Perl 5 was the addition of the ability to lexically scope your variables with my. So now I go and read code other people wrote and see them using the local function to do what should be done with my. I always try to explain to people the difference when they don't know it, because local can get funky if you're using multiple threads (since it modifies that variable only locally within the block of code ( ... )
Reply
Reply
I think the more subtle nuance here is that Perl is both a general-purpose programming language, with platform-independent features (those that can be isolated from, and portable across, architecture and representation) and a scripting language, which gives hooks into an OS.
Think about cat, cut, head, tail, less, grep, uniq, sort, and join - Unix commands that can be used to do a lot of sophisticated things, even implement some features of a relational database without DBMS software. Then consider regular expressions, sed, awk, and cut. Combine these with lex/flex (or Antlr for you young whippersnappers) and yacc/bison (or JCup) and pretty soon you're talking about real power. Some of these (e.g., awk by itself) are Turing-complete, but as David Padua, a professor of ours at UIUC, put it in his Advanced Compilers (CS 426) course: "I'm a programmer, not a poet". :-)
Back when the vi/emacs wars were relevant, this was an important distinction. For a time, after the first advent of ( ... )
Reply
Leave a comment