7stud has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
Can someone point me to some documentation where it says it's legal to have a string on the right side of the match operator?
use strict; use warnings; use 5.016; my $str = 'hello'; if ($str =~ 'he') { say 'yes'; } --output:-- yes
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: string on right side of =~?
by Athanasius (Archbishop) on Apr 21, 2013 at 07:24 UTC | |
Re: string on right side of m//?
by moritz (Cardinal) on Apr 21, 2013 at 09:35 UTC | |
Re: string on right side of m//?
by BrowserUk (Patriarch) on Apr 21, 2013 at 07:37 UTC | |
Re: string on right side of m//?
by 2teez (Vicar) on Apr 21, 2013 at 09:46 UTC |
Back to
Seekers of Perl Wisdom