Can you spot why this code does not do anything? Well, it took me 15 minutes, anyway. It was 6 am, but that does not really excuse anything.
if( undef $value ) { null_style() }
elsif( $value eq NONE ) { null_style() }
elsif( $value eq DEFAULT ) { default_style() }
elsif( $value eq SURPRISE_ME ) { surprise_me() }
elsif( $value =~ m/^LOCAL:(.*)/ ) { local_style( $1 ) }
elsif( $value =~ m/^URL:(.*)/ ) { redirect( $1 ) }
Before everyone decides to tell me what is wrong, I really do know how to test if a variable is defined. I just have this new keyboard that I am getting use to.
reminds me... (Score:1)
Maybe a few more years will help...
Re:reminds me... (Score:2)
use warningsperl would catch this for you.Re:reminds me... (Score:2)
In this case, 'use warnings' was the problem. I had to transfer this stuff to a system that had perl5.005, then had to remove that pragma. It was early in the morning and I neglected to add -w to the shebang line.
But then, that's why I choose the title I used.
Re:reminds me... (Score:1)
0 == $a, the compiler will balk if you forget the extra equals sign.new keyboard (Score:1)
He he he... Funny
I think I'll use it in a new sig:
-------------------------
This is my sig. It's not much since I just have this new keyboard that I am getting use to
-------------------------
BTW, why weren't you running under "-w"? That would have immidiatly caused perl to shout "Use of uninitialized value in string eq
------------------
Offer Kaye