in reply to Perl ignore arrow object operator in search/replace

But specially for your example, you can do it like
my $ip_wan = new NetAddr::IP("10.20.20.1/24"); my $ip_addr = $ip_wan->addr(); for (@line) { s/<IP_WAN>/$ip_addr/; }

Replies are listed 'Best First'.
Re^2: Perl ignore arrow object operator in search/replace
by fouinix (Initiate) on Feb 17, 2014 at 13:32 UTC
    Thanks :)