Note that I didn't use $a or $b as those should be reserved for the sort function.#!/usr/bin/perl use strict; use warnings; my $s='ABCAAAABBBCCCCCAAABBBCCC'; if (0 == $s =~ tr/ABC//c) { print "All letters are A B or C"; }
Chris
In reply to Re: Match only certain characters?
by Cristoforo
in thread Match only certain characters?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |