bronto has asked for the wisdom of the Perl Monks concerning the following question:

Reading this thread I went into a linguistic interference problem. That is, punctuation variables as a very little meaning when translated in Italian...

So, could anybody explain what punctuation variables are, and what's the reason for their name? Variabili di punteggiatura leaves little space for an Italian person to guess... I think I got an idea from perlfaq7, but I'd really would like to make it less foggy.

Thanks in advance

Ciao!
--bronto


The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
--John M. Dlugosz

Replies are listed 'Best First'.
Re: Punctuation variables???
by gjb (Vicar) on Sep 15, 2003 at 08:03 UTC

    AFAIK punctuation variables are just variables that have only punctuation characters in their names such as '@$', '@>', '$_', '$@', etc. Some more examples of punctuation characters are ,.;:!? and friends.

    Hope this helps, -gjb-

Re: Punctuation variables???
by rinceWind (Monsignor) on Sep 15, 2003 at 13:02 UTC
    Try perldoc perlvar. This gives you not only a list of all the "punctuation" variables, their equivalents under use english;, but probably also contains some alternatives to describing them as punctuation variables.

    Hope this helps.

    --
    I'm Not Just Another Perl Hacker

Re: Punctuation variables???
by John M. Dlugosz (Monsignor) on Sep 15, 2003 at 19:22 UTC
    According to perlvar,
    Variable names in Perl can have several formats. Usually, they must begin with a letter or underscore ... and may contain letters, digits, underscores...

    Perl variable names may also be a sequence of digits or a single punctuation or control character. ...

    Finally, new in Perl 5.6, Perl variable names may be alphanumeric strings that begin with control characters (or better yet, a caret). ...

    The term punctuation variable refers to the second variation of the second paragraph. Consider it short for punctionuation-based variable, using the noun implicitly as an adjective.

    What characters constitute the set of punctuation characters? It doesn't say, other than by implication all the ones with built-in meanings. I've seen the British currency symbol used in golf. Perhaps someone familiar with the source code will jump in and say what exactly is considered punctuation.

    —John