http://qs321.pair.com?node_id=1218127


in reply to How to differentiate an empty array from an unitialized one?

See split. You can give an extra argument called LIMIT:
my @array = split m/,/ , $_, -1;
From perldoc -f split:
If LIMIT is negative, it is treated as if it were instead arbitrarily large; as many fields as possible are produced.