Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl ignore arrow object operator in search/replace

by pajout (Curate)
on Feb 17, 2014 at 12:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1075167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-23 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found