|
|
|
|
|
by cogman10
2180 days ago
|
|
I mean, the combinations of $%@ are really astoundingly bad. $ alone has so many different meanings and operations depending on context. You won't find that sort of thing in any other language. Not even PHP which for some bizarre reason brought $ along for the ride. Here's a fun exercise, write a dictionary of arrays. Now write a dictionary of 2d arrays. In any other language, that's hardly a challenge to both read and write such a structure. Not so with perl. |
|
Umm … ok:
my %dict = ( foo => [ 1, 2, 3 ], bar => [ 4, 5, 6 ], );
> Now write a dictionary of 2d arrays.
my %dict2d = ( foo => [ [1, 2, 3], [4, 5, 6] ], bar => [], );
It’s pretty much identical to JS. Not sure how that’s supposed to exemplify how hard it is to write Perl.