By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,541 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,541 IT Pros & Developers. It's quick & easy.

PERL Variable names, Significant Length

P: 2
Hello everyone,

I'm new to PERL and i just wanted to ask how many are the significant initial characters in naming a variable in PERL. I know that a variable has a maximum name length of 255, but how many of these are significant.

In C for instance,
<quote>
63 significant initial characters in an internal identifier or a macro
name (each universal character name or extended source character is
considered a single character)
31 significant initial characters in an external identifier
< end quote>
Aug 7 '09 #1
Share this Question
Share on Google+
4 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
@robokevs009
You should take a read of the perldata language reference page. It should answer your questions.

Regards,

Jeff
Aug 7 '09 #2

KevinADC
Expert 2.5K+
P: 4,059
On my Vista 64 bit with strawberry perl 5.10 I can use a scalar with 257 characters (not including the $ at the beginning). At 258 I get the "identifier too long" error.
Aug 8 '09 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
@KevinADC
He he, you tried it, didn't you? :)
Aug 8 '09 #4

KevinADC
Expert 2.5K+
P: 4,059
@numberwhun
I'm guilty. May I be punished now?

Aug 8 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.