Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

More like 1 line of sh vs 1 line of perl

by buckaduck (Chaplain)
on Nov 18, 2002 at 21:27 UTC ( #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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2022-11-26 12:47 GMT
Find Nodes?
    Voting Booth?