O
Orion93
Actually i try to make a script to compte all lines of all pl files. Also i
find how to do it for one file but no for all of them. Try to use opendir
but i don't understand how to use it!
Please help me!
See my script:
#!/usr/bin/perl
sub recupPages
{
my $nomFic = shift;
my $result = shift;
# Récupération des lignes du fichier
open(F,$nomFic);
open(SORTIE,">> $result");
$i = 0;
while(<F>)
{
$i ++;
}
print SORTIE " $nomFic $i\n";
close F;
close SORTIE;}
my $emplacement = "C:\\stat\\test.pl";
my $ficResultat = "C:\\result.txt";
recupPages($emplacement,$ficResultat);
Tks for all!
find how to do it for one file but no for all of them. Try to use opendir
but i don't understand how to use it!
Please help me!
See my script:
#!/usr/bin/perl
sub recupPages
{
my $nomFic = shift;
my $result = shift;
# Récupération des lignes du fichier
open(F,$nomFic);
open(SORTIE,">> $result");
$i = 0;
while(<F>)
{
$i ++;
}
print SORTIE " $nomFic $i\n";
close F;
close SORTIE;}
my $emplacement = "C:\\stat\\test.pl";
my $ficResultat = "C:\\result.txt";
recupPages($emplacement,$ficResultat);
Tks for all!