Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl ignore arrow object operator in search/replace

by pajout (Curate)
on Feb 17, 2014 at 12:19 UTC ( #1075167=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1075167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2020-06-03 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (24 votes). Check out past polls.

    Notices?