# From ikegami's code while () { chomp; push(@records, [ split(/\|/) ]) unless /^\s*$/; }