in reply to array and string split
To assist you better, could you show some example output of the two commands show port and show port $PORT_NO detail that you are trying to parse?* Also, I see you're splitting on '\n', which is a literal backslash followed by a lower case n, is that intentional? If you meant to split on a line break, you should use "\n" (in double quotes, because those interpolate, single quotes don't).
* Perhaps the output of use Data::Dumper; $Data::Dumper::Useqq=1; print Dumper(\@port); and in the loop print Dumper($output_str);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array and string split
by numele (Sexton) on Jan 27, 2015 at 00:32 UTC | |
by Anonymous Monk on Jan 27, 2015 at 01:04 UTC | |
by BillKSmith (Monsignor) on Jan 27, 2015 at 14:09 UTC |