Cristoforo has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; $_ = "foobar1"; if (/o(.*)a/) { for my $i (0..$#+) { print substr($_, $-[$i], $+[$i] - $-[$i]), "\n"; } } OUTPUT C:\perlp>perl t1.pl ooba ob C:\perlp>
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: @- and @+ question
by Juerd (Abbot) on Jun 19, 2007 at 19:15 UTC | |
by demerphq (Chancellor) on Jun 19, 2007 at 19:55 UTC | |
by Juerd (Abbot) on Jun 19, 2007 at 21:22 UTC | |
by demerphq (Chancellor) on Jun 19, 2007 at 22:35 UTC | |
by Cristoforo (Curate) on Jun 19, 2007 at 19:33 UTC |