-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
go*****@hotmail.com (Gerard Oberle) wrote in
news:c4**************************@posting.google.c om:
The following Perl script
print ((time/86400) % 4), " foo foo foo foo\n";
Perl has a rule when it comes to interpreting statements like this:
"if it looks like a function, it IS a function."
So, because of your parentheses, it is as if you wrote:
$x = print( (time/86400)%4 );
$x, " foo foo foo foo\n";
The solution is either to add a + before the first parenthesis:
print +((time/86400) % 4), " foo foo foo foo\n";
or to add another set of parentheses:
print (((time/86400) % 4), " foo foo foo foo\n");
For your future reference, comp.lang.perl is a defunct newsgroup. General
perl questions should be posted to comp.lang.perl.misc; you'll get a better
response there.
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPynqOmPeouIeTNHoEQIu7ACghrgjRzXwWjijpWA+ihwOUK SSZQEAnRAr
dlcsK2oa9GH1M3p1WYE8AUVW
=2btu
-----END PGP SIGNATURE-----