You can just loop through the lines, like the code below. See split on this too.
use Data::Dumper; while(<DATA>) { @array = split('\|', $_); # printing to Dumper, just to show what @array looks like now print Dumper @array; # insert DBI stuff here ... } __DATA__ |John Smith|123 Any Street||Any City|KS|23568| |Mary Smith|123 Any Avenue||Any Town|KS|32546|
In reply to Re: Parsing Pipe Delimited Multi-line File
by b10m
in thread Parsing Pipe Delimited Multi-line File
by LinuxBoxRocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |