That is the correct and documented behavior (perldoc -f split). Trailing empty fields are dropped on split when you use it like that. If you want to keep them, use:
my @row = split m/;/ => $_, -1;As corion said, safer to use Text::CSV_XS.
In reply to Re: Split and join - semicolons around empty fields are lost
by Tux
in thread Split and join - semicolons around empty fields are lost
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |