Bryan Harris wrote:
Does anyone know why this doesn't do what I expect?
% perl -e '$i="123.52.32.1"; $j=45; $b="$i_".$j*2; print $b, "\n";'
90
I'd like it to print: 123.52.32.1_90
What's going on here?
TIA.
- Bryan
Yoy don't have a variable called $i_.
Changed '$b="$i_".$j*2;' to '$b="${i}_".$j*2;'
--
Flemming Greve Skovengaard The prophecy of the holy Norns
a.k.a Greven, TuxPower a tale of death and doom
<[EMAIL PROTECTED]> Odin saw the final sign
4112.38 BogoMIPS the end is coming soon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>