fouinix has asked for the wisdom of the Perl Monks concerning the following question:
Perl replace "<IP_WAN>" by "10.20.20.1/24->addr()" and not "10.20.20.1". It seems perl ignore arrow operator "->" I tried with simple quote ' ' or double quote " " No success :(my $ip_wan = new NetAddr::IP("10.20.20.1/24"); for (@line) { s/<IP_WAN>/$ip_wan->addr()/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl ignore arrow object operator in search/replace
by pajout (Curate) on Feb 17, 2014 at 12:19 UTC | |
by fouinix (Initiate) on Feb 17, 2014 at 13:32 UTC | |
|
Re: Perl ignore arrow object operator in search/replace (s/searchregex/replacestring/)
by Anonymous Monk on Feb 17, 2014 at 12:10 UTC | |
by LanX (Saint) on Feb 17, 2014 at 14:01 UTC | |
by tobyink (Canon) on Feb 17, 2014 at 20:06 UTC | |
by LanX (Saint) on Feb 17, 2014 at 20:16 UTC | |
by tobyink (Canon) on Feb 17, 2014 at 21:11 UTC | |
|