Thanks Uri! On Thu, Feb 23, 2017 at 10:32 PM, Uri Guttman <u...@stemsystems.com> wrote:
> On 02/23/2017 05:19 PM, Andrew Solomon wrote: > >> Running Perl 18.2 I was surprised to discover that I can use single and >> double quotes as regex delimiters without the 'm' operator. >> >> For example, instead of writing >> >> "/usr/bin/perl" =~ m"/perl" >> >> I can just write >> >> "/usr/bin/perl" =~ "/perl" >> >> Can anyone point me to the documentation indicating which delimiters >> don't need the 'm' operator? >> >> >> you actually are thinking in the wrong direction. the =~ operator causes > its right side to always be a regex unless the s/// or m// or tr/// ops are > seen there. you can even use an expression or sub call or anything on the > right of =~ and it will be parsed as a regex (if no op is there as i just > said). > > you can easily check this out with something simple like "/usr/bin/perl" > =~ "/pe" . "rl". > > so it isn't the delimiters as you think but the =~ op itself that makes it > a regex. > > uri > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- Andrew Solomon Mentor@Geekuni http://geekuni.com/ http://www.linkedin.com/in/asolomon