Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: I think I just found a good reason to use backticks in a void context.

by OfficeLinebacker (Chaplain)
on Jan 13, 2007 at 21:10 UTC ( [id://594592]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^3: I think I just found a good reason to use backticks in a void context.
in thread I thought I found a good reason to use backticks in a void context, but I was wrong.

I agree that if I had used system(), only with no redirection, the performance would probably be the same. I didn't try that, but I did try backticks WITH redirection and got a similar penalty (or loss of efficiency?) to using system() with redirection. I noted that in an update to the OP. I am sorry if I was unfair.

Tell me, is the following an accurate characterization:

By using backticks, I am effectively making the inside of my program the system call's STDOUT. Using backticks in a void context is the functional equivalent of redirecting output of the system call to /dev/null. With backticks, the computer has to do less work (and the programmer has to do less typing).

I don't mean to endorse of the practice by the above statements.


I like computer programming because it's like Legos for the mind.
  • Comment on Re^4: I think I just found a good reason to use backticks in a void context.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://594592]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.