title: perl parsing configuration braces style
body: <p>I wonder if perl can do parsing for braces configuration of junos and convert to csv.</p>
  
  <pre><code>interfaces {
    apply-groups policer-arp;
      ge-1/0/0 {
          description "*** Description ***";
          unit 0 {
              family inet {
                  address 10.100.200.1/24 {
                      arp 10.100.200.2 mac 00:16:d4:e7:9b:de;
                  }
              }
          }
      }
      ge-1/0/2 {
          description " Description ";
          vlan-tagging;
          unit 101 {
              description "NODEB_CLUSTER#101";
              vlan-id 101;
              family inet {
                  address 10.187.132.3/27 {
                      vrrp-group 1 {
                          virtual-address 10.187.132.1;
                          priority 190;
                          accept-data;
                      }
                  }
              }
          }
          unit 102 {
              description "Description";
              vlan-id 102;
              family inet {
                  address 10.187.132.35/27 {
                      vrrp-group 2 {
                          virtual-address 10.187.132.33;
                          priority 200;
                          accept-data;
                      }
                  }
              }
          }
          unit 103 {
              description "NODEB_CLUSTER#103";
              vlan-id 103;
              family inet {
                  address 10.187.132.67/27 {
                      vrrp-group 3 {
                          virtual-address 10.187.132.65;
                          priority 190;
                          accept-data;
                      }
                  }
              }
          }
          unit 104 {
              description "NODEB_CLUSTER#104";
              vlan-id 104;
              family inet {
                  address 10.187.132.99/27 {
                      vrrp-group 4 {
                          virtual-address 10.187.132.97;
                          priority 200;
                          accept-data;
                      }
                  }
              }
          }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Interface, IP Address, VLAN, Virtual-Address, Vrrp-group, Vrrp Priority
  ge-1/0/0,10.100.200.1/24, , , , ,               
  ge-1/0/2, , , , , ,
  ge-1/0/2.101,10.187.132.3/27,101,10.187.132.1,1,190
  ge-1/0/2,102,10.187.132.35/27,102,10.187.132.33,2,200
  ge-1/0/2,103,10.187.132.67/27,103,10.187.132.65,3,190
  ge-1/0/2,104,10.187.132.99/27,104,10.187.132.97,4,200
  </code></pre>
  
  <p>So in brief, we convert junos configuration to csv, for interface configuration we counts interface ge-1/0/2, than ge-1/0/2.101 as it's interface for vlan 101, ge-1/0/2.102 for vlan 102, so on. 
  Does perl can parse it or is there any quicker ways to convert it?</p>