in reply to There has to be an easier way...

You probably want to be using split. This takes a string and splits it into an array of strings, breaking it up on a specified delimiter. For example:

my $data = "f1|f2|f3|f4|f5"; my @data = split /|/, $data; print $data[2], "\n"; # prints f3, of course- arrays start on 0.
Or, using array slices:

my $data = "f1|f2|f3|f4|f5"; my ($clliA, $clliZ) = (split /|/, $d)[1,3]; # $clliA = "f2" # $clliZ = "f4"
Fun fun fun...

Alan

update: Yikes, everyone beat me to it... oops.