in reply to Re: home work help
in thread home work help

Another way to handle one-liners would be to simply have the If statment afterwards
print "foo \n" if $bar > 3;
and for short things, this also works ... I like it to help keep the scrolling/line count down.
for(my $I=0;$I<10;$I++) { print "foo \n" if $bar > 10 }
I leave the semi-colon off for one line loops, just for readability sake, but include it on multiline loops. Strict doesn't yell about it, and its just a personal style thing.

mbond

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.