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