Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Perl will not match my RegEx pattern....

by FierceMoose (Initiate)
on Mar 19, 2014 at 14:52 UTC ( [id://1078949]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl will not match my RegEx pattern....
in thread Perl will not match my RegEx pattern....

I suspect the data as well, but I'm not sure what can be done to clean it up with out altering the actual data. Chomp has had not change on operation either. Perhaps I need to convert it to a quoted word for RegEx to work?

my $acopy = qw($SeatLoc);

I'm somewhere between novice & intermediate in my experience and not immune to the 'obvious' mistake. ;-)

Replies are listed 'Best First'.
Re^3: Perl will not match my RegEx pattern....
by choroba (Cardinal) on Mar 19, 2014 at 15:23 UTC
    qw does not interpolate variables. This statement is equivalent to
    my $acopy = '$SeatLoc';

    Note the single quotes.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: Perl will not match my RegEx pattern....
by AnomalousMonk (Archbishop) on Mar 19, 2014 at 18:22 UTC
    Perhaps I need to convert it to a quoted word for RegEx to work?

    Blindly converting something that's already a string to a string is unlikely to help. You already know that the regex you provided works for the sample strings you provided. Find out what your data really looks like!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1078949]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 01:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found