in reply to If I was forced to program in another language, the Perl language feature I would miss most would be:
Actually, the big one for me that's missing is autovivification.
The other day I had a list of co-ordinates (pulled from a DB as a record set). To put them into a grid, I simply did this:
The other day I had a list of co-ordinates (pulled from a DB as a record set). To put them into a grid, I simply did this:
That would've been a lot harder in most other languages.my @grid; foreach my $rec (@records) { $grid[$rec->{x}][$rec->{y}] = $rec; }
In Section
Past Polls