in reply to dividing variables...
Your syntax is correct. What's the value in $X{abc}? I suspect that it contains either a 0, is undefined, or is a string. Perl will automagically convert back and forth between strings and numbers as it makes sense in the context, but any string beginning with a non-numerical character1 is going to be interpreted as '0' in a numeric context (such as division).
1 A -, +, or . followed by digits will make those characters count as 'numeric' for purposes of this test=> e.g. "+1.0" => 1 , "-14" => -14, ".309480" => .309480, and so forth, but "-argh" => 0
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
|
|---|