in reply to Double Splits?

This solves the problem as initially stated and doesn't rely on the x#y#z being in the same piece of the list, and it allows for multiple lines to be this way:
$scalar = '1|2|3#4#5#6|789'; @list = split(/\|/,$scalar); @prefs = map {if (/#/) {split(/#/,$_);} } @list; print "\@list: " . join (' ', @list) . "\n"; print "\@prefs: ". join (' ', @prefs) . "\n";
I make no guarantee as to speed, relevence, or any other thing. Also, if you want just the first list element that's got x#y#z in it, you will need to do away with map and substitute something like, <code>split( /#/, (include function to grab just first list element here) ).