in reply to Re^2: Running complex sed from perl
in thread Running complex sed from perl
If I can figure out how to get double quotes at the begining and end of each line...
There are several ways to do that.
# if the current line is in $_ s/^|$/"/g; # if the current line is in $line $line =~ s/^|$/"/g; # or with [doc://substr] substr $_, 0, 0, '"'; substr $_, length $_, 0, '"'; # but it is simpler just to append a " $_ .= '"'; # or even $_ = '"' .$_ . '"';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Running complex sed from perl
by sunglant (Initiate) on Dec 02, 2013 at 23:39 UTC | |
by aaron_baugher (Curate) on Dec 02, 2013 at 23:51 UTC |