in reply to Perl reference array

Perl's list constructors flatten empty lists and arrays when building new lists. As LanX has written, there is no such thing as an "empty" element. You may define a placeholder value (e.g., undef or the empty string) for the use of your own application along with a custom parser (or maybe YAML/JSON/Text::CSV as LanX suggested), but that's as close as you can get.

c:\@Work\Perl>perl -wMstrict -le "use Data::Dump; ;; my @ar = (99, 88); my @empty = (); ;; my $ar = [ 1, @ar, 2, @empty, 3, (), ,,,,, (), (),(), 4 ]; dd $ar; " [1, 99, 88, 2, 3, 4]


Give a man a fish:  <%-(-(-(-<