in reply to Space and the /x modifier

others have said you ought to read perlre, and you should do that
but you can use \x20, whera as hex(20) is 32, and use of \x20 in a regex will match a space (same if you print "\x20")
perl -e " print 1 if q{ } =~ /\x20/ "

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Space and the /x modifier
by Django (Pilgrim) on Aug 29, 2002 at 11:54 UTC

    That's neat! Not necessary for an ordinary space as I can see from the answers above, but quite useful for some exotic chars. Thanx a lot!

    ~Django

    "Why don't we ever challenge the spherical earth theory?"