SYNOPSIS use String::Wildcard::Bash qw(contains_wildcard); say 1 if contains_wildcard("")); # -> 0 say 1 if contains_wildcard("ab*")); # -> 1 say 1 if contains_wildcard("ab\\*")); # -> 0 DESCRIPTION FUNCTIONS contains_wildcard($str) => bool Return true if $str contains wildcard pattern. Wildcard patterns include * (meaning zero or more characters), ? (exactly one character), [...] (character class), {...,} (brace expansion). Can handle escaped/backslash (e.g. foo\* does not contain wildcard, it's foo followed by a literal asterisk *). Aside from wildcard, bash does other types of expansions/substitutions too, but these are not considered wildcard. These include tilde expansion (e.g. ~ becomes /home/alice), parameter and variable expansion (e.g. $0 and $HOME), arithmetic expression (e.g. $[1+2]), history (!), and so on. Although this module has 'Bash' in its name, this set of wildcards should be applicable to other Unix shells. Haven't checked completely though. SEE ALSO Regexp::Wildcards to convert a string with wildcard pattern to equivalent regexp pattern. Can handle Unix wildcards as well as SQL and DOS/Win32. As of this writing (v1.05), it does not handle character class ([...]) and interprets brace expansion differently than bash. Other String::Wildcard::* modules.