[prog] re the perl course
Akkana
akkana at shallowsky.com
Fri Feb 7 11:43:13 EST 2003
[Why learn perl if you already know python?] I know it was mostly a
joke, but I thought I'd add a comment that I just this week encountered
another machine at work where I needed to write a script and discovered
python wasn't installed. Lots of machines (especially big servers
shared by lots of people) still don't have python installed, though in a
few years I expect it will be much more common. But these days just
about everyone installs perl.
Rasjid Wilcox writes:
> It took me several days to work out that whenever I got an error message that
> just seemed completely out there, that I was probably just missing a
> semi-colon.
>
> It is now the first thing I look for when Perl gives me an error. (I still
> leave them off quite often. *sigh*)
For similar problems in C, I've found emacs' auto-indent amazingly
helpful. Often, I'll hit return and the cursor will jump to an odd
indentation level that I didn't expect ... then I know I have a syntax
error, such as a missing semicolon or missing close-quote, in an earlier
line.
(Of course, other editors also do this; you don't have to use emacs
to get the benefits of auto-indenting.)
Emacs doesn't seem to do this by default. So to turn it on,
in .emacs or .xemacs/init.el, I have:
(global-set-key "\C-m" 'newline-and-indent)
(setq tabify nil)
...Akkana
More information about the Programming
mailing list