Carl Friedberg wrote:
Mark, I can explain number 1 by precedence and the results from number
2, which, however I can not explain, nor understand. Here's a simpler
example of number 2:
$ perl -e "print (2)*5;"
2
Does this make it easier to see?
$ perl -we 'print print (2)*5;'
print (...) interprete
At 6:31 PM -0400 9/4/03, Carl Friedberg wrote:
>Mark, I can explain number 1 by precedence and the results from number
>2, which, however I can not explain, nor understand. Here's a simpler
>example of number 2:
>
>$ perl -e "print (2)*5;"
>2
I think John's explanation applies here as well. With
Mark, I can explain number 1 by precedence and the results from number
2, which, however I can not explain, nor understand. Here's a simpler
example of number 2:
$ perl -e "print (2)*5;"
2
Huh? Parens turn this into a list operator or something? Dan, or
someone, help!
Carl
> -Original Messa
Mark Berryman wrote:
Could someone please explain to me why only the last two expressions
return correct results?
$ perl -e "print (212-32)*5/9;"
180
$ perl -e "print (212-32)*5;"
180
$ perl -e "print (212-32);"
180
$ perl -e "print 5*(212-32)/9;"
100
There was just a long discussion on perl5porte