Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2010/10/15

Array of Troubles

This is perfectly legal Perl.
my @x = ( 1 ,2 ,3, 4, ) ;
This can be useful when you have things you want to add to or move around, not having to be sure to remove the last comma and add one if you move up the last element.

Compare this SQL.
SELECT foo , bar , blee  , FROM quuz ;

That'll give you an error. In one sense, well, sure. On the other hand, it sucks because the same dynamic forces that happen as you program in Perl come forth as you develop SQL queries.

I suppose the solution is to put a kind of null into the last field so you can shuffle until the cows come home, but I'm still frustrated.