in reply to Parsing delimited file contents

Try to split your input:
my @tokens = split /\|/, $line; print "@tokens[0..2]\n";