|
|
|
|
|
by tyingq
3818 days ago
|
|
I suspect it's the wide range of special operators, variables and default arguments. Knowing, for example, that shift() shifts @_ by default. That <> iterates over @ARGV. That chomp chomps $_. Messing with @INC changes library search paths, etc. Or, perhaps the syntax for dealing with elements in a somewhat deep data structure, like: push(@{$TV{$family}{kids}},"anotherkid"); Sometimes, people are just griping about regex syntax though, which seems disingenuous, since many languages use the exact same pcre expressions. I like perl, but if it's been a while, there's definitely some back and forth with books to decipher something I wrote some time ago. |
|
Some comment from the position of someone familiar with Modern Perl, which is largely what's practiced on CPAN:
> shift() shifts @_ by default
This is discouraged, precisely because it messes with @_. It has valid uses, but people tend to make sure it's clear from the code why it's used. (Mainly in OO helper stuff.)
> <> iterates over @ARGV
Almost nobody uses that, precisely because it's very unreadable. It only exists for compatibility reasons and was made to serve people used to sed/awk.
> chomp chomps $_
I haven't seen code use chomp in ages. I've never used it myself.
> Messing with @INC changes library search paths, etc.
This is rarely used as well. Mainly only when doing release engineering. It's also most often done via `use lib 'whatever';`.
That is an outdated way to write that. In a decent modern style it would be written like this: And with a more modern Perl, this: