While the other posters have focused on your direct problem and on your poor code flow. I'm wondering about your question of checking the readonlyness of a variable. My best stab is this:
sub is_readonly { eval {my $save=$_[0]; $_[0]=42; $_[0]=$save;}; return $@ =~/read.?only/; }
Can anybody come up with a cleaner way?
TACCTGTTTGAGTGTAACAATCATTCGCTCGGTGTATCCATCTTTG ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGCIn reply to Re: How could I check if a variable is 'read-only'?
by theorbtwo
in thread How could I check if a variable is 'read-only'?
by vladb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |