Gossamer Forum
Home : General : Perl Programming :

[Please Help me] how to create only-read variable use Perl?

Quote Reply
[Please Help me] how to create only-read variable use Perl?
Smile Thanks for your Help!
Quote Reply
Re: [wac] [Please Help me] how to create only-read variable use Perl? In reply to
I'm not sure what exactly you're asking or what you are trying to achieve using the Perl read-only variable $`.

Can you give us an example of what you're trying to do? It could help us to answer your question more specificaly.

- wil
Quote Reply
Re: [Wil] [Please Help me] how to create only-read variable use Perl? In reply to
use the constant pragma, like this:
Code:
use constant foo => "bar";
print foo;[/b]

constants may be hashes, arrays, subroutines, etc.....

http://www.perldoc.com/....1/lib/constant.html

--Philip
Links 2.0 moderator

Last edited by:

ThatPerson1024: Nov 27, 2001, 9:53 AM