merc58
Technical User
- Aug 18, 2008
- 4
I want to match an IP address in a string and store in a variable thus :-
$string = "192.168.2.1";
while (<STDIN>) {
$_ = /\d{1,3}\.{3}\d{1,3}/;
$ip = $1;
}
is this correct?
$string = "192.168.2.1";
while (<STDIN>) {
$_ = /\d{1,3}\.{3}\d{1,3}/;
$ip = $1;
}
is this correct?