Hi!
I ask two questions:
1) how can i do to add a line in the begining of a file ?
2) how can i do to delete lines after a character string which is in a line
?
thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
Can anybody tell me why this code doesn't work ?
#!/usr/bin/perl -w
open(FICHIER,"rdn1.html");
open (TEMP,">>temp.html");
while()
{
print TEMP $_ until ($_ =~m/ancre/);
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
How can i do to delete the last line of a file ?
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
this code doesn't work:
@temp=;
$temp[2]="";
$temp[3]="";
$temp[4]="";
$temp[5]="";
print TEMP @temp;
The error message is "Use of uninitialized value in print at 01_info.pl line
25, line 1."
can anybody help me ?
Franck
--
To unsubscribe, e-
Hi!
I would like too delete the 2nd, 3rd, 4, and 5 lines of a file.
how can i do ?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have a problem with my code:
#!/usr/bin/perl -w
opendir (LMI,"lmi") || die "impossible d'ouvrir lmi: $!";
$chaine="BEGIN PAPIER";
while($fichier=readdir LMI)
{
open (FICHIER,"lmi/$fichier") || die "impossible d'ouvrir $fichier:
!$\n";
open(TEMP,">>temp.htm")|| die "impossible d
Hello!
Is there a function which count the number of files in a directory ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
I have a problem with that code:
#!/usr/bin/perl -w
use File::Copy;
opendir (LMI,"lmi") || die "impossible d'ouvrir lmi: $!";
$chaine='BEGIN PAPIER';
while($fichier=readdir LMI)
{
next if ($fichier eq '.' or $fichier eq '..');
open (FICHIER,"lmi/$fichier") || die "impossi
Hi!
I want to copy "temp.htm" to "aol.htm"
Why doesn't this code work ?
#!/usr/bin/perl -w
open(TEMP, "+>temp.htm");
open(FICHIER,">lmi/aol.htm");
use File::Copy;
copy("temp.htm","lmi/aol.htm") ;
close FICHIER;
close TEMP;
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
Hi!
I have a file where there is a line whitch begans by the string "".
I would like to remove the string "" by nothing.
How can i do ?
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello!
I have a problem with this code:
#!/usr/bin/perl -w
use File::Copy;
open (CONCAT,"lmi/concat.htm") || die "impossible d'ouvrir concat.htm:
$!\n";
open (CONCAT2,">lmi/concat2.htm") || die "impossible d'ouvrir concat2.htm:
$!\n";
while()
{
s///i;
print (CONCAT2 $_);
}
close
Hi!
How can i do to insert several lines in the beginning of a existant file ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
I would like to store the number of a line whitch corresponds to a string.
How can i do ?
Thanks
FRanck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here is an extract of my code:
1>$chaine2="";
2>$chaine3="";
3>$chaine4="";
4>for($i=0;$i<$cpt;$i++)
5>{
6> $chaine2="\n";
7> $chaine3=$titre[$i];
8> $chaine4 = $chaine2.$chaine3;
9> print TEMP $chaine4;
10>}
There is a problem with line 8; the message is :"Use of uniniti
Hi!
> I have a file with a line that is "".
> I would like to create a file with all the lines after the line
> "___".
> I don't know how to do that
>
> Thanks
>
> Franck
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
> Hi!
>
> I have a file with a line that is "".
> I would like to create a file with all the lines after the line
> "___".
> I don't know how to do that
>
> Thanks
>
> Franck
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
Hi!
How can i repair (with a regular expression) a line with nothing inside ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
How can i do to delete a line whitch contains a charcter string ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
How can i do to extract a string between two others strings ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
I have the follwing code:
while ()
{
push @line, $_ if(m/^
Hi!
I have in a HTML file some lines like:
Apple Expo renaît sur le
Net
Comparatif des fournisseurs
d'accès : Wanadoo reprend son titre
I would like to extract the strings: "
I have wrote the following code:
while()
{
print TEMP "$1\n" if(m/(< a href=\"\/rdn\?oid.*rub);
}
The finding lines are like that: "gqgfqsgdkg< a
href="rdn?oiddsfhlhfdsrub=lhfdlhg" class sljdfsgkjfd"
I only want to extract the underlined string. How can i do to stop the
extraction
Hi!
I have wrote the following code:
while ()
{
if(m/(http:\/\/www.01net.com\/rdn?oid=[0-9].*&rub=[0-9].*)/ )
{
print TEMP2 "$1\n" ;
}
}
The matching doesn't work ! want to match for example :
http://www.01net.com/rdn?oid=54682&rub=12456
Hi!
I have the following code:
#!/usr/bin/perl -w
open(FIC,">/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.ht
m") || die "Impossible d'ouvrir $!\n";;
@tab = stat (FIC);
print scalar localtime($tab[10]);
The date of c0111_05.htm is november 5th 2001.
But the print is now !
I'm sorry, I've found
Thank you
-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 20 novembre 2001 15:18
À : COLLINEAU Franck FTRD/DMI
Cc : [EMAIL PROTECTED]
Objet : Re: writting in a file
Should be print TEMP $_;
On Tue, Nov 20, 2001 at 02:57:25PM +0
Greetings,
How can i get the number of the week from localtime function ?
Best regards,
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Greetings,
I have the following code:
opendir (INFO,"l:/01_informatique") || die " impossible d'ouvrire le
répertoire 01_informatique: $!";
while ($fic=readdir INFO)
{
if($fic=~/^c/)
{
@date=stat($fic);
print "$date[7]\n";
}
}
close INFO;
I have found
Thanks
-Message d'origine-
De : COLLINEAU Franck FTRD/DMI
[mailto:[EMAIL PROTECTED]]
Envoyé : lundi 10 décembre 2001 11:08
À : '[EMAIL PROTECTED]'
Objet : Stat function
Greetings,
I have the following code:
opendir (INFO,"l:/01_informatique") || die " impossible d'ouvri
Hi!
I 've written the code below.
There is a problem with "rename": i have the message: "permission denied".
Nevertheless, I have all the rights.
What 's happen ?
Franck
___
#!/usr/bin/perl -w
$now=time;
opendir (INFO,"l:/
Title: RE: -d test file
I've found. I have to put the absolute path.
Is there a way without absolute path ?
Franck
-Message d'origine-
De : COLLINEAU Franck FTRD/DMI
[mailto:[EMAIL PROTECTED]]
Envoyé : mardi 22 janvier 2002 08:15
À : [EMAIL PROTECTED]
Objet : -d test file
Greeti
30 matches
Mail list logo