develooper Front page | perl.beginners | Postings from January 2002

What are the uses of the =~ operator?

Thread Previous | Thread Next
January 16, 2002 16:50
What are the uses of the =~ operator?
Message ID:
I am new to regualr expressions and becoming  accqainted with the =~
operator. It appears to me that the =~ allows me to match a pattern in a
REGEX against a variable. As such it  replaces the $_ varible.

$name =~ /[rabs]/;

mtaches with a string containing   any of the following characters   r a b s

is this correct? I am quite confused....

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About