From: Rob Dixon
> bacoms wrote:
> >
> > Ho, I wanted to declare an HTML list as a constant array and then
> > print it but cannot work out the stntax.
> >
> > This is what I've coded;
> >
> > use constant NAVTABSLIST => ["\n",
> >
bacoms wrote:
>
> Ho, I wanted to declare an HTML list as a constant array and then
> print it but cannot work out the stntax.
>
> This is what I've coded;
>
> use constant NAVTABSLIST => ["\n",
> "
> \n",
>
Thanks Shawn and Chas for replying. For the moment I'll use the
print @{ NAVTABSLIST() };
solution.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Sat, 2008-12-27 at 12:52 -0500, Chas. Owens wrote:
> I too have worked at places that have these sorts of obnoxious
> policies. Most often I have found that the policy has been created by
> lazy sysadmins who don't want to take the time to install the modules
> (or learn how, since often they d
On Sat, Dec 27, 2008 at 12:15, Mr. Shawn H. Corey wrote:
> On Sat, 2008-12-27 at 11:51 -0500, Chas. Owens wrote:
>> * only if you have Readonly::XS installed, otherwise it uses a tied
>> variable that throws an error when STORE is called.
>
> The problem with Readonly et al. is that it is not a st
On Sat, 2008-12-27 at 11:51 -0500, Chas. Owens wrote:
> * only if you have Readonly::XS installed, otherwise it uses a tied
> variable that throws an error when STORE is called.
The problem with Readonly et al. is that it is not a standard module. I
have worked in places that do not allow anythin
On Sat, Dec 27, 2008 at 11:04, Mr. Shawn H. Corey wrote:
snip
> Perl does not have true constants. What `use constant` does is create a
> sub that returns the value. That means you can use it as a sub in all
> your code.
snip
Just out of curiosity, what is your definition of a "true constant"?
On Sat, Dec 27, 2008 at 06:10, bacoms wrote:
> Ho, I wanted to declare an HTML list as a constant array and then
> print it but cannot work out the stntax.
>
> This is what I've coded;
>
> use constant NAVTABSLIST => ["\n",
snip
> pr...@navtabslist.
snip
You may be better served by the Readonly m
On Sat, 2008-12-27 at 03:10 -0800, bacoms wrote:
> Ho, I wanted to declare an HTML list as a constant array and then
> print it but cannot work out the stntax.
>
> This is what I've coded;
>
> use constant NAVTABSLIST => ["\n",
> "
> \n",
>