[prog] quick perl question

Daniel lc-programming at nada.refused.cc
Thu Mar 4 14:55:59 EST 2004


On Thu, Mar 04, 2004 at 05:50:37PM +1100, Jacinta Richardson wrote:
> Php has a similar inconsistency.
> 	$a = 1.5;
> 	$a--;
> What's $a?  It certainly isn't 0.5.

I cannot follow you:

> echo '<?php $a = 1.5; $a--; print $a."\n"; ?>' | php
0.5
> perl -le '$a = 1.5; $a--; print $a'
0.5


						-Daniel-


More information about the Programming mailing list