Sample answers to Christmas Quiz
philip.newton at gmail.com
Thu Dec 18 20:52:54 GMT 2008
On Thu, Dec 18, 2008 at 19:58, David Alban <extasia at extasia.org> wrote:
> On Thu, Dec 18, 2008 at 10:17 AM, Chris Jack <chris_jack at msn.com> wrote:
>> 4) How many different variable types are there in Perl? Be as sensibly voluminous in your answer as you are > able.
>> have been asked this in more interviews that I care to recall and generally interviewers seem to be looking > for 3 (scalar, list, and hash) but code, filehandle, and format are also high level types.
> i would have said only two: scalar and list, since arrays and hashes
> are both lists.
They can both be initialised from lists, but I wouldn't call them lists.
That's like saying that '3' is a variable just because it's a literal
that you can use to initialise a variable with.
Lists are values, arrays and hashes are variables.
Philip Newton <philip.newton at gmail.com>
More information about the london.pm