Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: home work help

by mbond (Beadle)
on Jun 20, 2001 at 18:04 UTC ( [id://89997]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89997]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found