in reply to Re: Perl treats period as space in string
in thread Perl treats period as space in string
You can solve this problem with qr in Regexp Quote Like Operators.
use strict; use warnings; use Test::More tests => 2; my $phrase = qr/club\.market/; unlike( 'club market', $phrase, 'not match space' ); like( 'club.market', $phrase, 'match period' );
RESULT,
1..2 ok 1 - not match space ok 2 - match period
Bill
In Section
Seekers of Perl Wisdom