Help for this page

Select Code to Download


  1. or download this
    while (<DATA>) {
        chomp;
        print "\n$1 =" and next if /^(interface\s.+)/;
        print "$1" and next if /^\s+(switchport description\s.+)/;
    }
    
  2. or download this
    my (%data, $last);
    while (<DATA>) {
    ...
    
    ##now print
    for ( sort keys %data ) { print "$_ = $data{$_}\n" }