in reply to Re: Evaluating a regex replacement value
in thread Evaluating a regex replacement value
(I'm in the process of abstracting the keyword/value pairs into a lookup hash, as per my previous post)$line =~ s/<:INCOMING:([^:>]*):?>/int($incoming * ($1 || 1))/e; $line =~ s/<:OUTGOING:([^:>]*):?>/int($outgoing * ($1 || 1))/e; $line =~ s/<:INGRESS:>/$eth1/; $line =~ s/<:EGRESS:>/$eth0/; if ($line =~ /<:RADIUS:>/) { foreach my $ip (@radius_ips) { $thisline = $line; $thisline =~ s/<:RADIUS:>/$ip/; print OUT $thisline; } }
|
|---|