Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

btw: "Perl Design Patterns"

by kabel (Chaplain)
on Jun 14, 2003 at 19:04 UTC ( #265937=note: print w/replies, xml ) Need Help??


in reply to "Perl Design Patterns"

did somebody notify the map that wants to be a grep? ;-) of course, i think:
# code found under "Decorating Lists" entitled paragraph, line 6. my @files = reverse sort map { -d $_ ? $_ : () } readdir DIR;
i have not seen this solution before, but i find it all sorts from cool to strange.

strange - i think, anyone with a functional background expects that, after a map, there is exactly the same number of elements in the list as before.

cool - it shows that the grep is essential the sugar coat around the syntactic sugar. but, because the grep is a standard tool in any unix environment, the gain of expressiveness is tremendous.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://265937]
help
Chatterbox?
[Corion]: Discipulus: Well, in many cases it doesn't make sense to build an interface and complicated program just to enter 20 rows into a database ;) But yes, automating data imports should pay off in the long run
[LanX]: Choroba: this happened before I joined, was still in uni, but my boss was summoned to the CEO of the second biggest German bank at that time and could only say " I told them its not ready" ;)
[LanX]: memories....I missed my connection while chatting
[Discipulus]: in this case Corion we are speaking about software licensing: evry year or two we must rescan the whole ced to produce an excel report, while at every activation / disactivation we update a black box DB: i said that i a week i can produce the perl to..
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2017-03-29 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.