How to google for &&=
April 28, 2008 5:56 PM Subscribe
How do I find the answer to "what does &&= do in Perl?" via Google?
I'm not looking for what &&= does. I'm looking for how to find it on Google. Thank you.
I'm not looking for what &&= does. I'm looking for how to find it on Google. Thank you.
Googling "perl operators" did it for me.
If that didn't work, I would have tried "list of perl operators."
If I hadn't known they were called operators, I would have tried "perl manual" or "perl dictionary" or "perl reference," looking for something that listed everything perl does, hopefully in an easy-to-navigate fashion that would help me find the part I'm looking for quickly.
posted by winston at 6:00 PM on April 28, 2008
If that didn't work, I would have tried "list of perl operators."
If I hadn't known they were called operators, I would have tried "perl manual" or "perl dictionary" or "perl reference," looking for something that listed everything perl does, hopefully in an easy-to-navigate fashion that would help me find the part I'm looking for quickly.
posted by winston at 6:00 PM on April 28, 2008
Stick it in quotes
It looks like Google can do the && part fine, but it doesn't seem to recognize the = part. For example, += (a very common operator) generates zero results.
Perl is an annoying language for trying to look up things like that, because it uses tons of special characters for everything. For example, I defy anyone to figure out what most of the Perl Golf winners are actually doing by looking up each part in Google. I guess it's better than APL though.
posted by burnmp3s at 6:10 PM on April 28, 2008
It looks like Google can do the && part fine, but it doesn't seem to recognize the = part. For example, += (a very common operator) generates zero results.
Perl is an annoying language for trying to look up things like that, because it uses tons of special characters for everything. For example, I defy anyone to figure out what most of the Perl Golf winners are actually doing by looking up each part in Google. I guess it's better than APL though.
posted by burnmp3s at 6:10 PM on April 28, 2008
Best answer: I think the poster is asking for a direct way to search for something like &&=, not an indirect way to find this particular example (such as "google for perl operators").
Assuming that I'm correct, the answer is: You don't.
Suggestions such as pompomtom's "put it in quotes" are not accurate. When you ask google for "&&=", it actually gives you the results for "&&". That is, it ignores the equals sign. This is the same as if you didn't put it in quotes in the first place.
According to Google's help page on punctuation:
posted by Flunkie at 6:12 PM on April 28, 2008
Assuming that I'm correct, the answer is: You don't.
Suggestions such as pompomtom's "put it in quotes" are not accurate. When you ask google for "&&=", it actually gives you the results for "&&". That is, it ignores the equals sign. This is the same as if you didn't put it in quotes in the first place.
According to Google's help page on punctuation:
Google doesn't recognize special characters such as exclamation points, question marks, or the @ sign. These types of characters are so common that including them in a search would greatly slow the delivery of the search results. (...) we don't currently offer a way to force Google to recognize all special charactersThey don't explicitly say that the equals sign is included in this list of characters that they don't support, but it sure seems to be.
posted by Flunkie at 6:12 PM on April 28, 2008
No one really has any idea what Google does internally, but if their implementations are anything like the academic community's ideas about indexing, they deliberately ignore various punctuation characters to, as their help page says, improve speed. The characters literally are not in the indexes -- they're still there in the full text, of course, as you can see in cached copies; they keep everything -- but they would, theoretically anyhow, limit the amount of text that gets indexed as much as possible. When you have the entire internet to index, every character you can leave out helps, since they seem to (according to Alexa + some math) get 2.8 billion searches per day from ~395 million users.
(Or put another way, each character on their front page = a terabyte downloaded each year... which isn't actually relevant to the question but it's an awesome number...)
posted by blacklite at 6:49 PM on April 28, 2008
(Or put another way, each character on their front page = a terabyte downloaded each year... which isn't actually relevant to the question but it's an awesome number...)
posted by blacklite at 6:49 PM on April 28, 2008
Response by poster: Not that it matters, but incidentally, googling perl operators and/or checking the perlop page also don't actually tell you what ||= or &&= do. :-)
posted by arrhn at 8:08 PM on April 28, 2008
posted by arrhn at 8:08 PM on April 28, 2008
Response by poster: Whoops. I take it back. Perl op does indeed list it.
posted by arrhn at 8:14 PM on April 28, 2008
posted by arrhn at 8:14 PM on April 28, 2008
My first thought was to Google for "perl operators". The fifth hit was the abovementioned perlop - Perl operators and precedence.
posted by dws at 11:08 PM on April 28, 2008
posted by dws at 11:08 PM on April 28, 2008
« Older How can I get a custom sweater pattern developed? | Fine dining with no reservations? Newer »
This thread is closed to new comments.
posted by nev at 5:58 PM on April 28, 2008