in reply to Re^2: Matching quoted variables. Cant make it work..
in thread Matching quoted variables. Cant make it work..

Fletch--

I'm often a pedant myself, so thanks for the correction. I don't quite follow what you mean, though. Could you provide or point me to a trivial example, perhaps?

--roboticus
  • Comment on Re^3: Matching quoted variables. Cant make it work..

Replies are listed 'Best First'.
Re^4: Matching quoted variables. Cant make it work..
by Fletch (Bishop) on Mar 17, 2006 at 01:13 UTC

    Suppose you've got a roman numeral class. If you treat an instance as a number it works as a number ($fourty_two = $rn_six * $rn_seven;); however when you print it out it represents itself as the roman numeral form (print "The answer is $fourty_two\n"). To get the string version you might explicitly use $as_roman = "$roman_instance" to force stringification (granted in most cases you'd probably be either interpolating it with something else or concatenating it with another string). Or another plausible occurrence might be some operation that just returns the string value, i.e. return "$roman_instance".

    Again, it's a very contrived case, but there are occasions where you will use $a = "$b".