Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Automatically add all defined functions to your @EXPORT

by ikegami (Patriarch)
on Jul 14, 2005 at 20:48 UTC ( [id://475043]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Automatically add all defined functions to your @EXPORT
in thread Automatically add all defined functions to your @EXPORT

I don't get the logic of this.

As an occasional user of multiple greps, I find

@var = something1 grep { something2 && something3 } map { something4 } keys %something5;

less readable than

@var = something1 grep { something2 && something3 } map { something4 } keys %something5;

But sometimes, something2 && something3 is too long, so I break them down into:

@var = something1 grep { something2 } grep { something3 } map { something4 } keys %something5;

And yes, I sometimes do

if( $var1 == 1 ) { if( $var2 == 2 ) { doSomething(); } }

in preference to

if( $var1 == 1 && $var2 == 2 ) { doSomething(); }

when the condition becomes quite long.

Replies are listed 'Best First'.
Re^6: Automatically add all defined functions to your @EXPORT
by ikegami (Patriarch) on Jan 21, 2009 at 19:32 UTC
    I agree that
    @var = something1 grep { something2 && something3 } map { something4 } keys %something5;
    isn't all that readable, but you can do
    @var = something1 grep { something2 && something3 } map { something4 } keys %something5;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-24 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found