On Tue, Jul 20, 2004 at 11:40:25PM -0700, 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
perl does. Try turning on warnings.
> I'd like it to print: 123.52.32.1_90
>
> What's going on here?
You need something like
$b="${i}_".$j*2;
otherwise you are trying to access $i_
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>