good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How to substitute all tabs only in a specific fieldby kcott (Archbishop) |
on May 26, 2020 at 02:39 UTC ( [id://11117257]=note: print w/replies, xml ) | Need Help?? |
G'day Xuo, There are a lot a problems with your post:
Please read "How do I post a question effectively?" carefully. So, with a lot of guessswork, I believe the following technique, succinctly and efficiently, does what you want:
The 'r' modifier was introduced in Perl v5.14: see "perl5140delta: Non-destructive substitution". Attempting to modify $1 directly results in a "Modification of a read-only value" fatal error. If you have a earlier version of Perl, you'll need to use an interim variable; perhaps something like this:
— Ken
In Section
Seekers of Perl Wisdom
|
|