1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
| #! /usr/local/bin/perl
$SEP = "/";
my $INPUT_FILE = ".".$SEP."defile_caract.txt";
my $INPUT_FILE = ".".$SEP."defile_caract_out.txt";
open (HANDLE_INPUT_FILE, $INPUT_FILE) || die "open problem of $INPUT_FILE : $!";
$contenu = <HANDLE_INPUT_FILE>;
close(HANDLE_INPUT_FILE);
open (HANDLE_OUTPUT_FILE, ">$OUTPUT_FILE") || die "open problem of $OUTPUT_FILE : $!";
for ($i=0; $i<3000; $i++){
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,2;
$contenu = substr $contenu,2;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,13;
$contenu = substr $contenu,13;
$a1 = "$a1;".substr $contenu,0,2;
$contenu = substr $contenu,2;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,7;
$contenu = substr $contenu,7;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = substr $contenu,0,7;
$contenu = substr $contenu,7;
$a1 = "$a1;".substr $contenu,0,16;
$contenu = substr $contenu,16;
$a1 = substr $contenu,0,1;
$contenu = substr $contenu,1;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,13;
$contenu = substr $contenu,13;
$a1 = substr $contenu,0,7;
$contenu = substr $contenu,7;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = "$a1;".substr $contenu,0,32;
$contenu = substr $contenu,32;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,13;
$contenu = substr $contenu,13;
$a1 = substr $contenu,0,7;
$contenu = substr $contenu,7;
$a1 = "$a1;".substr $contenu,0,13;
$contenu = substr $contenu,13;
$a1 = substr $contenu,0,2;
$contenu = substr $contenu,2;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = substr $contenu,0,2;
$contenu = substr $contenu,2;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,9;
$contenu = substr $contenu,9;
$a1 = "$a1;".substr $contenu,0,4;
$contenu = substr $contenu,4;
$a1 = substr $contenu,0,5;
$contenu = substr $contenu,5;
$a1 = "$a1;".substr $contenu,0,4;
$contenu = substr $contenu,4;
$a1 = "$a1;".substr $contenu,0,4;
$contenu = substr $contenu,4;
$a1 = "$a1;".substr $contenu,0,4;
$contenu = substr $contenu,4;
$a1 = "$a1;".substr $contenu,0,18;
$contenu = substr $contenu,18;
print HANDLE_OUTPUT_FILE "$a1\n";
}
close(HANDLE_OUTPUT_FILE); |
Partager