in reply to Perl subsititution oddities...

Fixing the split would be much more elegant, unless you actually need the NULL in each empty field. From perldoc -f split:

By default, empty leading fields are preserved, and empty trailing ones are deleted.

...

If LIMIT is unspecified or zero, trailing null fields are stripped (which potential users of "pop" would do well to remember). If LIMIT is negative, it is treated as if an arbitrarily large LIMIT had been specified.

So you can do my @array = split /:/, $line, -1; and have it keep all empty training fields.