Loading ...
Sorry, an error occurred while loading the content.

Réf. : [PBML] Working with Lists

Expand Messages
  • Olivier-Bernard RICHARD
    ... You could do something like this : DEL09A2,053.0009.34,TAD2K09 - 053.0009.34,DEL09A2,TAD2K09, - 053.0009.34,DEL09A2 - split on comma - $thing{$field1}
    Message 1 of 2 , Aug 8, 2000
    • 0 Attachment
      >I have a list like this:

      >DEL09A2,053.0009.34,TAD2K09,
      >DEL09A2,074.1001.30,LOST001,
      >DEL09A2,845.9112.22,RUG112CD,
      >DEL09A3,845.9112.22,RUG112CD,

      >What I need to do is format it like this

      >053.0009.34,DEL09A2
      >074.1001.30,DEL092A2
      >845.9112.22,DEL09A2,DEL09A3

      >i.e for each unique occurrence of field 2, print each occurrence of field 1

      You could do something like this :

      DEL09A2,053.0009.34,TAD2K09

      -> 053.0009.34,DEL09A2,TAD2K09,

      -> 053.0009.34,DEL09A2

      -> split on comma

      -> $thing{$field1} .= "$field2,"

      So you'll end up with a %thing, keys will be each field 1 (053.0009.34), and values will be each field 2 (DEL09A2, merged together with a comma)


      think it would work

      ozh
    • Oliver Manickum
      Hey Guys, I am trying to track the amount of connections that are made to ODBC via Perl Script. Not only the connections that are made with the script itself,
      Message 2 of 2 , Aug 8, 2000
      • 0 Attachment
        Tracking ODBC Connections

        Hey Guys,


                I am trying to track the amount of connections that are made to ODBC via Perl Script. Not only the connections that are made with the script itself,  but other applications that make connections too.  This is for an analysis of connections that are opened and not closed in NT Servers. 

                Has anyone came across this, or worked on something similar ?.. some help would be appreciated.

        - Oliver

      Your message has been successfully submitted and would be delivered to recipients shortly.