To find out whether a sequence contains a restriction site for BstYI, write;
if ($sequence =~ /[AG]GATC[TC]/) {...};
# This will match all of AGATCT, GGATCT, AGATCC, GGATCC.
You may specify a range of characters using a hyphen -.
A caret ^ at the front of the list negates the character class.
if ($string =~ /[AGTC]/) {...}; # matches any nucleotide
if ($string =~ /[a-z]/) {...}; # matches any lowercase letter
if ($string =~ /chromosome[1-6]/) {...}; # matches chromosome1, chromosome2 ... chromosome6
if ($string =~ /[^xyzXYZ]/) {...}; # matches any character except x, X, y, Y, z, Z