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.
In reply to Re: Perl subsititution oddities...
by Paladin
in thread Perl subsititution oddities...
by smellysocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |