in reply to assigning to array from a split with some empty fields
From the first paragraph of perldoc -f split:
By default, empty leading fields are preserved, and empty trailing ones are deleted.
A little further down you'll find that if you specify a negative LIMIT, it is treated as an arbitrarily large LIMIT, so:
should do what you want.@array = split /\|/, $text, -1;
Hugo
|
|---|