*** The previous line contains the naughty word '$&'. if /(ibm|apple|awk)/; # :-)
About this quote
- What does it mean?
- The previous line contains a prohibited pattern, demonstrated with a humorous regex example.
- In plain terms
- A line had a banned word, shown with a regex.
- What can you take from it?
- Use regex to detect unwanted content.
Where it applies
Putting it to work
Questions to consider
- How can regex be both useful and obscure?
Another view
The example is cryptic without context.
More from Larry Wall
The autodecrement is not magical.
Permalink to quote #274 When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi.
Permalink to quote #276 Remember though that THERE IS NO GENERAL RULE FOR CONVERTING A LIST INTO A SCALAR.
Permalink to quote #273
Related quotes
Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to make 10 ways to do something. :-)
Larry WallLarry Wall quote #1 The north German does not go in for extremes. He has broader horizons than the men from the mountains of Bavaria and Austria.
Karl DonitzKarl Donitz quote #2 Drink the first. Sip the second slowly. Skip the third.
Knute RockneKnute Rockne quote #2