http://www.perlmonks.org?node_id=45669


in reply to How do I match this without lookbehind?

my @results = grep {$_} split /([~]*?[^~])/, $input;