in reply to Parse a pipe-delimited list

To parse a line of data like this, one way to do it is to use split. You would create an array from the output of split as applied to your line of data with the appropriate delimiter. The array would contain each of your successive tokens.

Update: (added code example)

#!/usr/local/bin/perl use strict; use warnings; my $config = 'bar|development|/usr/bar/db|/dbdump'; my @tokens = split /\|/,$config; foreach (@tokens) { print "Token: $_\n"; }

No good deed goes unpunished. -- (attributed to) Oscar Wilde