in reply to
Floats and numeric context
Not that it matters much, but your last
;
was enclosing your
foreach
statement and not the
$x+=$_
as I would suppose you wanted. I think one liners are cool, but you really gotta double check, cause its easy to misplace a comma, period or a bracket.
#!/home/bbq/bin/perl
# Trust no1!
Comment on
RE: Floats and numeric context
Replies are listed 'Best First'.
RE: RE: Floats and numeric context
by
chromatic
(Archbishop)
on May 15, 2000 at 05:33 UTC
You can leave the semicolon off of the last statement in a block. The semicolon after the block is necessary to terminate the
foreach
statement.
[reply]
In Section
Seekers of Perl Wisdom