Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to change a part of a line in a text???

by monktim (Friar)
on Aug 11, 2003 at 13:06 UTC ( [id://282849]=note: print w/replies, xml ) Need Help??


in reply to How to change a part of a line in a text???

I think you're having trouble with escape characters. I broke it down into steps so you can see it plainly. I could have been very clever and given you one regex that would do it but it is easier to see what is going on here.
use strict; use warnings; my $str = "otsort ../mydata/SKE_DE_WKey_out.dat ../mydata/SKE_DE_WKey_ +out.srt /apost s(1001,8,c,a) om(1001,1,c,EQ,' ') f(fix,1371) core(600 +00)"; print "$str\n"; $str =~ s/\/apost s/\"\/apost s/; print "$str\n"; $str =~ s/ om\(/,om\(/; print "$str\n"; $str =~ s/ f\(fix.*/,record(1371)/; print "$str\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-03-28 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found