Strange asterisk use in a hash declaration

J

Jess Graves

In WWW::Scraper::Google (a module by Glenn Wood), a this hash is
declared:
(exactly as in Google.pm)

my $scraperRequest =
{
'fieldTranslations' => {
'*' => {
'*' => '*'
}
},
#http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&safe=active&q=turntable&btnG=Google+Search
'SKIP' => ''
'nativeDefaults' => {
'q' => '',
#'as_eq' => 'turntable',
#'oe' => 'utf-8',
#'as_q' => '',
'lr' => '',
'hl' => 'en',
'btnG' => 'Google Search',
'safe' => 'active',
#'as_epq' => 'google com',
#'as_sitesearch' => '',
#'as_oq' => '',
'ie' => 'UTF-8'
},
'nativeQuery' => 'q',
'url' => 'http://www.google.com/search?',
'cookies' => 0,
'type' => 'QUERY',
'defaultRequestClass' => undef
};

The first key fieldTranslations is assigned something I can't figure
out and I've had no luck searching (and searching and searching) for
the answer.

(If Google could just include symbols in their indexing life would be
so much better...)

Does the asterisk have any special meaning used like this? Could this
be as mundane as a hash field pointing to a hash field with a single
key that is an asterisk that points to a hash that has... yadda
yadda.. ?

If anyone knows what this:

'fieldTranslations' => {
'*' => {
'*' => '*'
}
},

accomplishes, I'd be greatful for some insight.

Thanks,

Jess
 
S

Sherm Pendley

Jess said:
If anyone knows what this:

'fieldTranslations' => {
'*' => {
'*' => '*'
}
},

accomplishes, I'd be greatful for some insight.

The '*'s are just one-character strings, nothing more. What meaning
those strings might have for the module or for Google, I don't know, but
to Perl they're just strings, nothing special.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top