- or download this
use strict;
use warnings 'all';
...
my @Rec = $str =~ /-+\s+show switchname\s+-+[^\w]+(\w+)/ig;
print "$_\n" for @Rec;
- or download this
__DATA__
show tech-support details
...
-------------------- show switchname ------------------
CCC220_ANG_GREEN
******************************************************************
- or download this
CCC217_ANG_GREEN
CCC218_ANG_GREEN
CCC219_ANG_GREEN
CCC220_ANG_GREEN