Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

More like 1 line of sh vs 1 line of perl

by buckaduck (Chaplain)
on Nov 18, 2002 at 21:27 UTC ( [id://213922]=note: print w/replies, xml ) Need Help??


in reply to (1) line of sh vs (~20) lines of perl ?

VSarkiss mentioned it parenthetically, but it needs to be emphasized: your "one line of sh" is really just an invocation of a much larger program called "find". You could do the same thing in Perl with system or exec commands.

The interesting thing is that with Perl you created your own program to find the files for you. And it seems that you did it quickly, easily, and portably -- in just a few lines of code (even fewer for some of the respondents). And if you wanted to, you could extend the program to perform tests that aren't easy to do with "find" (e.g. "File owner matches a record in an Oracle database"). You could do that with sh, but would you want to?

So what are you missing? Some respect for what you just accomplished, and for the language that makes it possible.

buckaduck

Log In?
Username:
Password:

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

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

    No recent polls found