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

Re: Substitution replacement not terminated

by choroba (Abbot)
on Sep 24, 2013 at 13:06 UTC ( #1055483=note: print w/ replies, xml ) Need Help??


in reply to Substitution replacement not terminated

Backquotes interpolate variables the same way as double quotes. Backslash the dollar signs.

BTW: Why do you run perl from perl? You can do the work inside the script, as well (untested):

open my $IN, '<', 'text.txt' or die $!; open my $OUT, '>', 'text.new' or die $!; while (<$IN>) { s/^(.{10})(.{382})(.*)$/$1^$2^$3/; print $OUT, $_; } close $OUT or die $!; rename 'text.new', 'text.txt';
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Substitution replacement not terminated
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-21 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls