in reply to What are all the Perl data types?

Do you want to count 'constant' (provided by use constant), or is that some sort of scalar?

How about a heredoc? Does the entity following __DATA__ or __END__ have a data type?

Is a list a distinct type from an array?


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: What are all the Perl data types?
by Joost (Canon) on May 03, 2007 at 10:49 UTC
    My take:

    constants are subroutines returning (lists of) scalars.

    heredocs are plain strings. they just have a different syntax from "normal" quoted strings.

    Everything after (and before) __DATA__ / __END__ is in a file, but everything after __DATA__ or __END__ is not processed until read (via the DATA filehandle, or by opening and reading __FILE__), so it's not perl data.

    A list differs from an array. I'm not sure if you can call a list a data type, in perl, though.