Hi Shawn,
> $str =~ m{ \A ( .{15} .*? ) \s }msx;
I don't think this would work if the value given in the match string (15 as per
above eg.) is greater than the character count of the particular string. Right?
Regards,
Akhthar Parvez K
http://Tips.SysAdminGUIDE.COM
UNIX is basically a simple operating system, but you have to be a genius to
understand the simplicity - Dennie Richie
On Sunday 18 Apr 2010, Shawn H Corey wrote:
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $str = "The black cat climbed the green tree";
> print "string: $str\n";
>
> my $extracted = $1;
> print "extracted: $extracted\n";
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/