#!/usr/bin/perl use strict; use warnings; my $words = "this is a series of words"; $words =~ s{((\w+(?:'\w+)*))}{ my $res; ( $res = &link( $1 ) ) ? $res : $1 }ge; print "$words\n"; sub link { my $word = shift; if( $word eq 'series' ){ return ucfirst $word; } return; } #### this is a Series of words #### #!/usr/bin/perl use strict; use warnings; my $words = "this is a series of words"; $words =~ s{((\w+(?:'\w+)*))}{ my( $res, $y ); ( ( $res, $y ) = &link( $1 ) ) ? "$res $y" : $1 }ge; print "$words\n"; sub link { my $word = shift; if( $word eq 'series' ){ return( ( ucfirst $word ), $word ); } return; } #### this is a Series series of words #### #### t/14-command-identity.................NOK 142/302 # Failed test 'Shell moved to the specified url for get_redirect' # in t/14-command-identity.t at line 217. # 'http://kent-cowgills-computer.local:64770/redirect/startpage' # doesn't match '(?-xism:(?-xism:^http://kent-cowgills-computer.local:64770/startpage))' # get http://kent-cowgills-computer.local:64770/redirect/startpage # eval $self->agent->uri t/14-command-identity.................ok 231/302 t/14-command-identity.................NOK 242/302 # Failed test '2 requests were made for reload' # in t/14-command-identity.t at line 220. # got: '1' # expected: '2' t/14-command-identity.................NOK 249/302 # Failed test '3 requests were made for reload_2' # in t/14-command-identity.t at line 220. # got: '2' # expected: '3' t/14-command-identity.................ok 301/302 # Looks like you failed 3 tests of 302. t/14-command-identity.................dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 142, 242, 249 Failed 3/302 tests, 99.01% okay t/26-form-no-form.....................ok 1/4 # Looks like you planned 4 tests but only ran 1. # Looks like your test died just after 1. t/26-form-no-form.....................dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-4 Failed 3/4 tests, 25.00% okay