in reply to Match variables : Beginner in perl

\w matches a "word character", but for a rather non-intuitive meaning of "word": it means it's an underscore, a digit, or a letter. Nothing more. If you want to include a single quote, you can use e.g. a character class
[\w']

Note that it includes quoting single quote, too. E.g.

"I don't like 'big mouths'", said he.

I'm not sure you'd like to treat 'big as a "word".

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Match variables
by haukex (Archbishop) on Jan 03, 2019 at 09:09 UTC

    Perl_Programmer1992:

    "word": it means it's an underscore, a digit, or a letter.

    Note that if you have Unicode strings, \w also includes Unicode's notion of "Word" characters - see Word characters. These are all considered "Word" characters: ξ ᚏ 𫝼 ஹ ᕭ 🅿

    By the way, you don't need to include "Beginner in perl" in your node titles :-) (see also How do I compose an effective node title?)

      Thanks @haukex , I will definitely go through the list.

      you don't need to include "Beginner in perl" in your node titles

      Sure and thanks ! :-)
Re^2: Match variables : Beginner in perl
by Perl_Programmer1992 (Sexton) on Jan 03, 2019 at 09:12 UTC

    Thanks @choroba ! that was really helpful