in reply to Re^5: PERL Variable Name, Significant length
in thread PERL Variable Name, Significant length

Here is what I do:

perl -e 'print "\$" . "x" x 257 . " = 1"' > 257.pl perl 257.pl
This does not give an error. However:

perl -e 'print "\$" . "x" x 258 . " = 1"' > 258.pl perl 278.pl Identifier too long at 258.pl line 1.
So it seems that on my system (32-bit Ubuntu) 257 is indeed the limit ... very strange though that this should be platform-dependent.

Replies are listed 'Best First'.
Re^7: PERL Variable Name, Significant length
by BrowserUk (Patriarch) on Aug 08, 2009 at 01:52 UTC

    System differences then. At least 255 is an understandable limit :) 257 makes no sense at all.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.