Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Recursive image processing (with ImageMagic)

by Anonymous Monk
on Nov 23, 2012 at 07:48 UTC ( [id://1005227]=note: print w/replies, xml ) Need Help??


in reply to Re: Recursive image processing (with ImageMagic)
in thread Recursive image processing (with ImageMagic)

I small critic your code , instead of  if (@ARGV == 0)

if( not @ARGV )

if( ! @ARGV )

unless( @ARGV )

or

@ARGV or exit print Usage();

Replies are listed 'Best First'.
Re^3: Recursive image processing (with ImageMagic)
by ColonelPanic (Friar) on Nov 23, 2012 at 08:29 UTC
    There is nothing unclear about if (@ARGV == 0) which quite intuitively translates to "if the number of arguments is zero." Your alternatives are all fine, too, but there is no reason other than personal preference to prefer one over the other.


    When's the last time you used duct tape on a duct? --Larry Wall

      There is nothing unclear (or evil, odd ) about your statement :) My small critic was not about clarity, but style -- perlishness

      "if no arguments" is more natural, its perlish

      If you feel like putting a number on it, you might say "if zero arguments" , but it doesn't follow the code

      if( @ARGV == 0 ) if numarg is zero if( 0 == @ARGV ) if zero is numargv

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found