A
Alexander Jack
How to declare and use a constant variable in Perl ,
please help me out ,
thanx in Advance .
please help me out ,
thanx in Advance .
How to declare and use a constant variable in Perl ,
please help me out ,
Hi ALex,
As so often.
Perldoc would be your friend.
or if you prefer web front ends
(go tohttp://perldoc.perl.org/and enter constant in the search field)
There's multiple option:
the one directly documented in the perl onine documentation can be seen with
perldoc constant
use constant NAME => "value";
or
use Readonly;
Readonly my $var = "value";
depending on which you prefer.
Ben
use constant NAME => "value";
or
use Readonly;
Readonly my $var = "value";
depending on which you prefer.
Ben
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.