Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: handle special character in filename

by aitap (Deacon)
on Oct 17, 2012 at 15:03 UTC ( #999557=note: print w/ replies, xml ) Need Help??


in reply to Re^2: handle special character in filename
in thread handle special character in filename

system("sed","-i","s/$org/$rep/g", $file);

By the way, you can use Tie::File and \Q..\E constructs inside native Perl regexps (instead of sed), thus not having to run sed (which costs you another fork() and some rename operations) and being able to replace any strings containing any special sharacters.

Sorry if my advice was wrong.


Comment on Re^3: handle special character in filename
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-10-21 04:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls