On Tue, Mar 19, 2002 at 11:57:19PM -0800, Jeremy Zawodny wrote: > So what is it, really, about Perl that makes it "so different" from > other languages. > > Much Perl code that I've read looks less like Java, C++, Python, or > VB. It tends closer to C, Shell, awk, sed, etc. > > Is it the regular expressions? The MTOWTDI? The use of "->" instead > of "."? All the funny characters?
Regular expressions never worried me, having grown used to them in vi. "->" wasn't a problem either, and I preferred its visual distinctiveness to the almost invisible "." used for OO programming elsewhere. Nor were all the funny characters or the use of $array[1] instead of @array[1] a problem. In fact I liked most of the things which are traditionally considered bad about Perl. The parts of Perl which did bother me at first were: $_. I felt much happier with named variables, and didn't really trust that a language which set $_ when I expected it to do so wasn't also going to fiddle with it behind my back. Formats. Having grown up on languages which have few restrictions on code layout I didn't like the idea of painting a picture of the desired output. I used printf instead. Modules not distributed with the core system. It didn't seem quite right using an extension; it felt too much like the sort of thing I used to do in my Z80 and MP/M programming days when I'd peek around in the running OS to get the information I wanted if there wasn't a standard function to fetch it. Conditions at the end of statements. Before Perl the only trailing condition with which I was familiar was C's do{}while construct and it took some time to shake off the belief that the condition would be executed last. Things I loved about Perl right from the start: Regular expressions, -w, hashes, lists, dynamically sized strings and arrays, -w, sort, and the fact that for simple tasks I could have a working Perl solution in less time than it took me to type #include <stdio.h> int main(argc, argv) int argc; char* argv; { -- Matthew Winn ([EMAIL PROTECTED])