Perl: the Markov chain saw | |
PerlMonks |
Re: perl one liner to replace matching stringby Athanasius (Archbishop) |
on Jun 10, 2018 at 07:48 UTC ( [id://1216295]=note: print w/replies, xml ) | Need Help?? |
Hello vinoth.ree, With warnings:
Output:
Perl sees @Filetyp as an (empty) array. Escape the sigil (and change \1 to $1): s/(\@Filetyp\s*?:)/$1 c/;.Output:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|