@list = qw( The quick brown fox jumped over the lazy dog ); listparse( ".[9]", @list ); #true listparse( ".[8]", @list ); #false listparse( "The ?adjectives:(.*) fox jumped over the lazy ?what", @list ); # $adjectives would be set as a ref to [ quick, brown ] # $what would be set to "fox" listparse( "The ?speed:{ $speed eq 'quick' } .*", @list ); # $speed would be set to 'quick' listparse( "The ?speed:{ $speed ne 'quick' } .*", @list ); # false listparse( "/word*", @list ); #true listparse( "/word /number .*, @list) ; #false