in reply to foreach skipping elements
split takes a regular expression as first argument, not a fixed string (there are exeptions). You need -1 as last argument to get trailing empty fields too.
@fields = split /\|/, $_, -1FWIW, You could also use Text::CSV_XS with sep_char => "|".
Enjoy, Have FUN! H.Merijn
|
---|
In Section
Seekers of Perl Wisdom