| |
| | WDVL: Perl Pattern Matching: Regular Expressions |
 | | Pattern matching is an integral, but somewhat complex, aspect of Perl programming; in fact, pattern matching is the very basis of inspiration for using Perl in many programming tasks. |
 | | Rudimentary pattern matching is probably familiar to many readers; in MS-DOS or Unix command lines, for example, you might request a directory listing for "*.txt" -- which, of course, means "all filenames which end with.txt". |
 | | In the first, we test to see whether a match against a piece of data is true (matches) or false (does not match); in the second, we use the constructed template to perform a "search and replace" on a matched pattern within a piece of data. |
| www.wdvl.com /Authoring/Languages/Perl/PerlfortheWeb/pattern_matching.html (2040 words) |
|