[Israel.pm] Selective warnings use
migo at homemail.com
Thu Feb 10 09:25:40 PST 2005
On 10 Feb 2005 10:49:47 +0100, Madani, Srikanth, VF-DE wrote:
> Mikhael Goikhman wrote:
> >Direct use of $] is possible, of course. This condition is portable:
> > if $] < 5.006;
> True, thanks.
> >So, the following line should do what you wanted:
> > eval "use warnings;" if $] >= 5.006;
> I can't seem to get this to work.
Yes, this can't work, because "use warnings;" only affects the inner eval
block, that is mostly empty.
So, your choices are either "-w" or (if you are cautious) $^W = 1|0;
Or upgrade perl to at least 5.6.0.
You may also continue to use "use warnings;" in 5.005 if you create
"warnings.pm" file on this older system and not on the newer systems.
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'
More information about the Perl