Perl_Programmer1992 has asked for the wisdom of the Perl Monks concerning the following question:
$dino = "I fear that I'll be extinct after a few million years."; if ($dino =~ /that (\w*) (\w*) (\w*) after/) { print "That said '$1' '$2' '$3' years.\n"; }
My question is that the above code should print I'll , be , extinct according to definition of match variables , but it's not printing anything , I want to know how perl is treating I'll , it's not a word then how we can match I'll , Kindly correct me what I am doing wrong.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Match variables : Beginner in perl
by choroba (Cardinal) on Jan 03, 2019 at 06:44 UTC | |
by haukex (Archbishop) on Jan 03, 2019 at 09:09 UTC | |
by Perl_Programmer1992 (Sexton) on Jan 03, 2019 at 09:36 UTC | |
by Perl_Programmer1992 (Sexton) on Jan 03, 2019 at 09:12 UTC | |
|
Re: Match variables : Beginner in perl -- webperl
by Discipulus (Canon) on Jan 03, 2019 at 08:32 UTC | |
by Perl_Programmer1992 (Sexton) on Jan 03, 2019 at 09:18 UTC | |
by jbodoni (Monk) on Jan 03, 2019 at 11:26 UTC | |
by dsheroh (Monsignor) on Jan 03, 2019 at 11:40 UTC | |
|
Re: Match variables : Beginner in perl
by hippo (Archbishop) on Jan 03, 2019 at 12:31 UTC |