in reply to Perl allows you to change the definition of false to make it true. (And vice versa.)
This should please the comp.lang.c old timers:
I wonder if you can redefine other read-only values? I could not get the following to work.use strict; use warnings; use 5.010; BEGIN { &Internals::SvREADONLY(\undef, 0); ${\undef} = "Demons are coming out of my nose!"; };
(I have no idea why you would want to do this apart from JAPH or intentional sabotage)BEGIN { &Internals::SvREADONLY(\'blue', 0); ${\'blue'} = 'turtle'; &Internals::SvREADONLY(\5, 0); ${\5} = 5.000000000001; };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl allows you to change the definition of false to make it true. (And vice versa.)
by tobyink (Canon) on Dec 14, 2012 at 15:14 UTC |
In Section
Meditations