| 1 | use Test::Morescip-perl cpan autobox-Core 1.33 Test/More/ qw(no_plan); |
| 2 | use strictscip-perl cpan autobox-Core 1.33 strict/; |
| 3 | use warningsscip-perl cpan autobox-Core 1.33 warnings/; |
| 4 | use autobox::Corescip-perl cpan autobox-Core 1.33 autobox/Core/; |
| 5 | |
| 6 | my $s = "The black cat climbed the green tree"; |
| 7 | my $color = $s->substrscip-perl cpan autobox-Core 1.33 main/substr().(4, 5); |
| 8 | |
| 9 | isscip-perl cpan autobox-Core 1.33 main/is(). $color, 'black'; |
| 10 | |
| 11 | my $middle = $s->substrscip-perl cpan autobox-Core 1.33 main/substr().(4, -11); |
| 12 | |
| 13 | isscip-perl cpan autobox-Core 1.33 main/is(). $middle, 'black cat climbed the'; |
| 14 | |
| 15 | my $end = $s->substrscip-perl cpan autobox-Core 1.33 main/substr().(14); |
| 16 | isscip-perl cpan autobox-Core 1.33 main/is(). $end, 'climbed the green tree'; |
| 17 | |
| 18 | my $tail = $s->substrscip-perl cpan autobox-Core 1.33 main/substr().(-4); |
| 19 | isscip-perl cpan autobox-Core 1.33 main/is(). $tail, 'tree'; |
| 20 | |
| 21 | my $z = $s->substrscip-perl cpan autobox-Core 1.33 main/substr().(-4, 2); |
| 22 | |
| 23 | isscip-perl cpan autobox-Core 1.33 main/is(). $z, 'tr'; |
| 24 |