in reply to Pattern Matching Query

How about using $sorted_values as the regex?
if ("abcdefghijklm" =~ /$sorted_values/) { ... }
Update Or index would work as well.

-Blake

Replies are listed 'Best First'.
Re^2: Pattern Matching Query
by Aristotle (Chancellor) on Sep 17, 2002 at 13:17 UTC
    And of course to play it safe, if ("abcdefghijklm" =~ /\Q$sorted_values\E/) {

    Makeshifts last the longest.