in reply to Re^2: Split() first 3 elements of @array
in thread Split() first 3 elements of @array
I cannot sxtract the IP address for the switch for some reason
The third line, with the IP address is indented: there is some whitespace at the beginning of the line, but your regular expression is looking for 'IP' at the beginning of the line: /^IP/. Change that to accept some leading whitespace and you should get a match: /^\s*IP/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Split() first 3 elements of @array
by Kenosis (Priest) on Aug 28, 2012 at 20:48 UTC |
In Section
Seekers of Perl Wisdom