=~
is the operator testing a regular expression match. The expression /9eaf/
is a regular expression (the slashes //
are delimiters, the 9eaf
is the actual regular expression). In words, the test is saying “If the variable $tag matches the regular expression /9eaf/ …” and this match occurs if the string stored in $tag
contains those characters 9eaf
consecutively, in order, at any point. So this will be true for the strings
9eaf xyz9eaf 9eafxyz xyz9eafxyz
and many others, but not the strings
9eaxxx 9xexaxfx
and many others. Look up the ‘perlre’ man page for more information on regular expressions, or google “perl regular expression”.
Related Posts:
- What exactly does += do in python?
- Use of “instanceof” in Java [duplicate]
- What are XAND and XOR
- ^=, -= and += symbols in Python
- What does the question mark character (‘?’) mean in C++?
- proper name for python * operator?
- What does the question mark character (‘?’) mean in C++?
- What does the percentage sign mean in Python
- Not equal to != and !== in PHP
- What does the percentage sign mean in Python
- Difference between “or” and || in Ruby?
- Difference between “and” and && in Ruby?
- Does Python have a ternary conditional operator?
- Which equals operator (== vs ===) should be used in JavaScript comparisons?
- How is the AND/OR operator represented as in Regular Expressions?
- Behaviour of increment and decrement operators in Python
- Is there a “not equal” operator in Python?
- What is the result of % in Python?
- Does Python have a ternary conditional operator?
- Is there a “not equal” operator in Python?
- What does the “+=” operator do in Java?
- What does the ^ (XOR) operator do? [duplicate]
- What do these operators mean (** , ^ , %, //)? [closed]
- What do these operators mean (** , ^ , %, //)? [closed]
- What does operator “dot” (.) mean?
- What does ‘&’ do in a C++ declaration?
- Creating a “logical exclusive or” operator in Java
- What does “|=” mean? (pipe equal operator)
- What are bitwise shift (bit-shift) operators and how do they work?
- assignment operator overloading in c++
- How to use operator ‘-replace’ in PowerShell to replace strings of texts with special characters and replace successfully
- Error: “expression must have integral or unscoped enum type” [duplicate]
- “inappropriate ioctl for device”
- PowerShell and the -contains operator
- Logical XOR operator in C++?
- Regex how to match an optional character
- “inappropriate ioctl for device”
- proper name for python * operator?
- What does the power operator (**) in python translate into?
- Difference between the == and %in% operators in R
- what is the meaning of == sign?
- The difference between += and =+
- PowerShell and the -contains operator
- What is the ‘new’ keyword in JavaScript?
- Regex how to match an optional character
- Reference — What does this symbol mean in PHP?
- What does question mark and dot operator ?. mean in C# 6.0?
- What is the idiomatic Go equivalent of C’s ternary operator?
- The tilde operator in Python
- What does `<>` mean in Python?
- What is ‘\0’ in C++?
- What is a Question Mark “?” and Colon “:” Operator Used for?
- What is the difference between ‘/’ and ‘//’ when used for division?
- ruby operator “=~” [duplicate]
- What does << mean in Ruby?
- error: ‘ostream’ does not name a type
- What does the colon (:) operator do?
- Is there an exponent operator in C#?
- What does ||= (or-equals) mean in Ruby?
- How to decrypt hash stored by bcrypt
- Multiple OR or AND conditions in IF statement
- What does “if (1)” do?
- Do I need to include #!/usr/bin/perl line in Perl script on Windows?
- Understanding the result of modulo operator: %%
- Is there a difference between x++ and ++x in java?
- Reference — What does this symbol mean in PHP?
- R: += (plus equals) and ++ (plus plus) equivalent from c++/c#/java, etc.?
- How do I use the MOSS script?
- What does “+=” (plus equals) mean?
- Global symbol requires explicit package name
- Javascript: operator overloading
- How do I completely mirror a web page?
- Is there a “not in” operator in JavaScript for checking object properties?
- Class template inheritance C++
- How can I sort a Perl hash on values and order the keys correspondingly (in two arrays maybe)?
- How to fix a locale setting warning from Perl
- Porting Perl to Python
- “End of script output before headers” error in Apache
- PERL API error 500 server closed connection without sending any data back
- Find size of an array in Perl
- How to use greater than operator with date?
- Using the AND and NOT Operator in Python [duplicate]
- Java Not Greater than Or Equal to Operator for Char Type
- What’s the difference between “mod” and “remainder”?
- What is the difference between the dot (.) operator and -> in C++?
- Python a &= b meaning?
- How to replace a string in an existing file in Perl
- What is the meaning of @_ in Perl?
- What is the meaning of @_ in Perl?
- How can I call a shell command in my Perl script?
- What are the double colons (::) in R?
- Using OR operator in a jQuery if statement
- OCaml mod function returns different result compared with %
- What is the best way to delete a value from an array in Perl?
- How to print variables in Perl
- The correct way to read a data file into an array
- How to use dos2unix?
- The tilde operator in C
- Prolog “or” operator, query