Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Open Files in Unix

by swartzieee (Initiate)
on Oct 08, 2008 at 20:04 UTC ( #716082=note: print w/ replies, xml ) Need Help??


in reply to Re: Open Files in Unix
in thread Open Files in Unix

to run as a perl script do i do system ("find -name cynlogging.properties -exec perl -p -i.backup -e 's/search/ +replace/g' {} \");


Comment on Re^2: Open Files in Unix
Re^3: Open Files in Unix
by blazar (Canon) on Oct 14, 2008 at 17:55 UTC

    I personally believe that if this is a question, then it should be marked with... a question mark. Anyway, the answer is yes, or at least that is a possible way to do it. (Except that, as a minor point, you should quote the backslash.) But more importantly why, precisely, should you run the above line "as a perl script?" The whole point was that probably a single find(1) command is better suited to your need than a whole Perl program. (Although one may consider there that perl is called multiple times in the second case, and this includes a overhead... probably a completely irrelevant consideration, in this particular situation - and there are simple cures, anyway.)

    --
    If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-08-22 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls