in reply to Contain yourselves please: THEORETICAL question about variable values being used as A PART of another variable's name.

Well you already made clear that it's normally a stupid idea, and here the foot gun:

C:>perl $a=1; $b1c=42; print ${"b${a}c"}; ^D 42

Nota Bene no strict 'refs' needed

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Update corrected vars to refs

  • Comment on Re: Contain yourselves please: THEORETICAL question about variable values being used as A PART of another variable's name.
  • Select or Download Code