Help for this page

Select Code to Download


  1. or download this
    use re 'debug';
    my $str = "abc";
    ...
                                 |   0| BRANCH failed...
    Match failed
    Freeing REx: ".|$"
    
  2. or download this
    my $str = "abc";
    print $str =~ m/(.)|$/g ? "matched! ".($1//'$') : 'no match', "\n"
    ...
    matched! c
    matched! $
    no match