- or download this
#!/usr/bin/perl
print "Entrez votre ip :";
...
print scalar @t,"\n"; # Don't waste a variable
print "[$_]\n" for @t; # Surround each match by brackets,
# print each match on its own line.
- or download this
Entrez votre ip :21.23
11
...
[3]
[
]
- or download this
Entrez votre ip :21.23
3
...
[.]
[23
]
- or download this
#!/usr/bin/perl
print "Entrez votre ip :";
...
@t=split(/[.\n]/,$ip); # Don't need \. for period in [ ]
print scalar @t,"\n";
print "[$_]\n" for @t;
- or download this
Entrez votre ip :21.23
2
[21]
[23]