Thanks, I put the DATA contents into an array and it worked perfectly.
One question on the quotemeta bit. The code snippet included:
if ($confLine =~ /ip4-address address="\Q$ip/) {Should that be
if ($confLine =~ /ip4-address address="\Q$ip\E/) {Or does it not matter, as the variable was the last thing in the regex? i had to tweak my regex and add a quote at the end, as it was matching incorrectly (i.e. 1.2.3.1 would also match 1.2.3.11, .12, etc.), so have gone with:
if ($confLine =~ /ip4-address address="\Q$ip\E"/) {In reply to Re^2: Return to original loop
by stroke
in thread Return to original loop
by stroke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |