[regex], [substr], [grep]: compter nombre d occurence, substitution d un vecteur
Salut tout le monde!
j ai ecris ce petit code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
use strict;
use String;
my $str = new String("1000");
my $bit_least =$str->charAt(3), "\n";
print $bit_least, "\n";
print !$bit_least, "\n";
my $bit_most =$str->charAt(0), "\n";
print $bit_most, "\n";
print !$bit_most; |
et j ai eu ce resulat:
Citation:
C:\Perl\bin>perl u:\souce_code_perl\string.pl
0
1
1
C:\Perl\bin>
mais j ai voulu un resultat comme ca:
Citation:
C:\Perl\bin>perl u:\souce_code_perl\string.pl
0
1
1
0
C:\Perl\bin>
je ne sais pas pourquoi ca marche pas! :(
Merci pour votre aide!