Ignoring the symtax error, that won't work, its an infinite loop, you need
while( $pairs =~ m{(\S+) \s/ (\S+)}xg ) { my( $ip, $mask ) = ( $1, $2 ); }
See Re: Surprise: scalar(($x, $y) = split)
In reply to Re^2: Match zero times in regex
by Anonymous Monk
in thread Match zero times in regex
by SomeNetworkGuy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |