Index: trunk/klask
===================================================================
--- trunk/klask	(revision 52)
+++ trunk/klask	(revision 53)
@@ -282,5 +282,5 @@
 
       # Ligne à virer car on récupère maintenant le modèle du switch
-      my ($desc, $type) = split ':', $sw->{description}, 2;
+      my ($desc, $type) = split m/ : /xms, $sw->{description}, 2;
       printf "%-25s 0--------->>>> %-25s %s\n", $sw->{hostname}, $desc, $sw->{model} if $verbose;
       }
@@ -302,5 +302,5 @@
       "A"=>"10", "B"=>"11", "C"=>"12", "D"=>"13", "E"=>"14", "F"=>"15"
       );
-   my @chars = split m//x, $car;
+   my @chars = split m//xms, $car;
    return $table{$chars[-2]}*16 + $table{$chars[-1]};
    }
@@ -312,5 +312,5 @@
    my $arp = shift;
 
-   my @paquets = split m/ : /x, $arp;
+   my @paquets = split m/ : /xms, $arp;
    my $return = '';
    foreach(@paquets) {
@@ -612,5 +612,5 @@
    my %db_switch_chained_port = ();
    for my $swport (keys %db_switch_connected_on_port) {
-      my ($sw_connect,$port_connect) = split ':', $swport;
+      my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
       $db_switch_chained_port{$sw_connect} .= "$port_connect:";
       }
@@ -619,5 +619,5 @@
       if ( exists $db_switch_chained_port{$sw->{hostname}} ) {
          chop $db_switch_chained_port{$sw->{hostname}};
-         push @{$sw->{portignore}}, split(':',$db_switch_chained_port{$sw->{hostname}});
+         push @{$sw->{portignore}}, split(m/ : /xms, $db_switch_chained_port{$sw->{hostname}});
          }
 #      print "$sw->{hostname} ++ @{$sw->{portignore}}\n";
@@ -903,10 +903,10 @@
       my $switch_hostname_sort = sprintf "%s %3s" ,$switch_hostname, $computerdb->{$ip}{switch_port};
 
-      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /x, $ip);
+      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /xms, $ip);
 
       my $mac_sort = sprintf "%04i-%s", 9999 - $mac_count{$computerdb->{$ip}{mac_address}}, $computerdb->{$ip}{mac_address};
 
       $computerdb->{$ip}{hostname_fq} = 'unknow' if $computerdb->{$ip}{hostname_fq} =~ m/^ \d+ \. \d+ \. \d+ \. \d+ $/x;
-      my ( $host_short ) = split m/ \. /x, $computerdb->{$ip}{hostname_fq};
+      my ( $host_short ) = split m/ \. /xms, $computerdb->{$ip}{hostname_fq};
 
       print <<"END_HTML";
@@ -947,9 +947,9 @@
       my $date = sprintf "%04i-%02i-%02i %02i:%02i", $year,$mon,$mday,$hour,$min;
 
-      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /x, $ipv4_address);
+      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /xms, $ipv4_address);
 
       my $mac_sort = sprintf "%04i-%s", 9999, $mac_address;
 
-      my ( $host_short ) = sprintf "%s %3s" , split(m/ \. /x, $db_switch_parent{$sw}->{switch}, 1), $db_switch_parent{$sw}->{port};
+      my ( $host_short ) = sprintf "%s %3s" , split(m/ \. /xms, $db_switch_parent{$sw}->{switch}, 1), $db_switch_parent{$sw}->{port};
 
       print <<"END_HTML";
@@ -981,5 +981,5 @@
 
    for my $swport (sort keys %db_switch_connected_on_port) {
-      my ($sw_connect,$port_connect) = split ':', $swport;
+      my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
       for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
 
@@ -995,5 +995,5 @@
       my $date = sprintf "%04i-%02i-%02i %02i:%02i", $year,$mon,$mday,$hour,$min;
 
-      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /x, $ipv4_address);
+      my $ip_sort = sprintf "%03i%03i%03i%03i", split( m/ \. /xms, $ipv4_address);
 
       my $mac_sort = sprintf "%04i-%s", 9999, $mac_address;
@@ -1003,5 +1003,5 @@
          if (exists $db_switch_output_port{$sw}) {
 
-            my ( $host_short ) = sprintf "%s %3s" , split( m/\./x , $sw, 1), $db_switch_output_port{$sw};
+            my ( $host_short ) = sprintf "%s %3s" , split( m/\./xms, $sw, 1), $db_switch_output_port{$sw};
 
             print <<"END_HTML";
@@ -1238,5 +1238,5 @@
          $maybe_more_than_one_switch_connected = 'yes';
 
-         my ($sw_connect,$port_connect) = split ':', $swport;
+         my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
          my @sw_on_same_port = keys %{$db_switch_connected_on_port{$swport}};
 
@@ -1289,5 +1289,5 @@
    print "------------------------------------------------\n";
    for my $swport (sort keys %db_switch_connected_on_port) {
-      my ($sw_connect,$port_connect) = split ':', $swport;
+      my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
       for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
          if (exists $db_switch_output_port{$sw}) {
@@ -1357,5 +1357,5 @@
    print "------------------------------------------------\n";
    for my $swport (sort keys %db_switch_connected_on_port) {
-      my ($sw_connect,$port_connect) = split ':', $swport;
+      my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
       for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
          if (exists $db_switch_output_port{$sw}) {
@@ -1382,5 +1382,5 @@
    my %db_building= ();
    for my $sw (@SWITCH) {
-      my ($building, $location) = split m/ \/ /x, $sw->{location}, 2;
+      my ($building, $location) = split m/ \/ /xms, $sw->{location}, 2;
       $db_building{$building} ||= {};
       $db_building{$building}->{$location} ||= {};
@@ -1405,5 +1405,5 @@
          $l++;
 
-         print "\"location$b-$l\" [label = \"$building".'/'.join('\n',split("/",$loc))."\", color = black, fillcolor = orange, style = filled];\n";
+         print "\"location$b-$l\" [label = \"$building".'/'.join('\n',split(m{ / }xms, $loc))."\", color = black, fillcolor = orange, style = filled];\n";
 #         print "\"location$b-$l\" [label = \"$building / $loc\", color = black, fillcolor = orange, style = filled];\n";
          print "\"building$b\" -> \"location$b-$l\" [len = 2, color = firebrick]\n";
@@ -1421,5 +1421,5 @@
 
             for my $swport (keys %db_switch_connected_on_port) {
-               my ($sw_connect,$port_connect) = split ':', $swport;
+               my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
                next if not $sw_connect eq $sw;
                next if $port_connect eq $db_switch_output_port{$sw};
@@ -1446,5 +1446,5 @@
 #   print "------------------------------------------------\n";
    for my $swport (sort keys %db_switch_connected_on_port) {
-      my ($sw_connect,$port_connect) = split ':', $swport;
+      my ($sw_connect,$port_connect) = split m/ : /xms, $swport;
       for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
          if (exists $db_switch_output_port{$sw}) {
