| KW.pm | Regular Expressions | #16 |
$cypher =~ tr/a-zA-Z/n-za-mN-ZA-M/;
$numcount = $string =~ y/0-9//; # Counts the number of numbers
| Modifier | Meaning |
|---|---|
| /c | Complement the search list |
| /d | Delete found but unreplaced characters |
| /s | Squash duplicates |
$clean =~ tr/a-zA-Z0-9_//cd; # Remove any non-alphanumeric character $quiet =~ tr/!/./s; # Wow!!! becomes just plain old Wow.
| << Previous | Index | Next >> | Copyright © 2002 Christopher Calzonetti |