Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: How to handle metacharacters in input file for Perl one-liner code

by debug (Initiate)
on Jul 16, 2015 at 14:12 UTC ( #1135018=note: print w/replies, xml ) Need Help??


in reply to Re: How to handle metacharacters in input file for Perl one-liner code
in thread How to handle metacharacters in input file for Perl one-liner code

Hello Dean,

Thanks for your reply.

I should probably have mentioned that I'm running this code inside an iterative loop, so am a bit concerned with execution time. I did consider going this approach instead of a system call, but honestly I have no idea which one would be a more cpu intensive process in terms of file open operations. Would you have any thoughts on that?

  • Comment on Re^2: How to handle metacharacters in input file for Perl one-liner code

Replies are listed 'Best First'.
Re^3: How to handle metacharacters in input file for Perl one-liner code
by Laurent_R (Canon) on Jul 16, 2015 at 16:57 UTC
    A pure Perl solution is likely to be faster than shelling out to the OS.
Re^3: How to handle metacharacters in input file for Perl one-liner code
by AnomalousMonk (Bishop) on Jul 16, 2015 at 16:56 UTC

    Shelling out to the OS is a very expensive process. If you're really concerned about execution time, do it all in Perl.


    Give a man a fish:  <%-(-(-(-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-10-22 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?