Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Rotating Log Files

by aukjan (Friar)
on Dec 28, 2005 at 20:33 UTC ( [id://519629]=note: print w/replies, xml ) Need Help??


in reply to Re: Rotating Log Files
in thread Rotating Log Files

Thanks to the remarks, I have added them to the snippit.. I always use strict and warnings, but left them out here since this is only a snippit

Also, using the ternary operator ?: just for his side effects is generally frowned upong, unless in golf or obfu, that is.

Which are the side-effects of this operator? I have never experienced any...

Go Fish!

Replies are listed 'Best First'.
Re^3: Rotating Log Files
by blazar (Canon) on Dec 29, 2005 at 12:49 UTC
    Which are the side-effects of this operator? I have never experienced any...

    But... you're using them, nevertheless! Generally one should use if (and else) for flow control and ?: to operate on values, e.g.

    if (something) { do 'this'; } else { do 'that'; } do (something ? 'this' : 'that');

    Of course ?: also acts like an "if-then-else" and you can use it like that. But that's what is generally considered a side effect, since you're discarding its return value which its key feature.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found