Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    for my $str ('Matched', 'No match') {
        print "match: Matched $1 for '$str'\n" if $str =~ /(\w*ed)/;
    }
    
  2. or download this
    defined: Matched Matched for 'Matched'
    defined: Matched Matched for 'No match'
    match: Matched Matched for 'Matched'