This is my code :
/^valeur=/ && do {
$val=$_;
$val=~s/valeur=//;
};
open(IN,"actualite.txt");
open(OUT,">>tamp.tmp");
$i=1;
while ( $line = )
{
if ( $i != $valeur )
{
print OUT $line;
};
$i++;
}
close IN;
close OUT;
of doing these very common while loops.
Paul Jasa
-Original Message-
From: Paul [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 7:20 AM
To: Stphane" JEAN BAPTISTE; PERL
Subject: Re: to copy a file (with perl)
Importance: High
--- Stephane JEAN BAPTISTE <[EMAIL PROTECTE
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> On Jun 25, Aaron Craig said:
>
> >In the spirit of TMTOWTDI -
> >
> >At 07:20 25.06.2001 -0700, Paul wrote:
> >>the brute force approach: =o)
> >>
> >> open IN, $fileor die $!;
> >> open OUT, ">$new" or die $!;
> >> print OUT $li
On Jun 25, Aaron Craig said:
>In the spirit of TMTOWTDI -
>
>At 07:20 25.06.2001 -0700, Paul wrote:
>>the brute force approach: =o)
>>
>> open IN, $fileor die $!;
>> open OUT, ">$new" or die $!;
>> print OUT $line while defined($line=);
>> close OUT;
>> close IN;
>
>print OUT $_
In the spirit of TMTOWTDI -
At 07:20 25.06.2001 -0700, Paul wrote:
>the brute force approach: =o)
>
> open IN, $fileor die $!;
> open OUT, ">$new" or die $!;
> print OUT $line while defined($line=);
> close OUT;
> close IN;
print OUT $_ while ();
Aaron Craig
Programming
iSoftit
--- Stéphane JEAN BAPTISTE <[EMAIL PROTECTED]>
wrote:
> Hw could I copy a file in Perl
the brute force approach: =o)
open IN, $fileor die $!;
open OUT, ">$new" or die $!;
print OUT $line while defined($line=);
close OUT;
close IN;
There are better ways, but this is a good one
On Mon, 25 Jun 2001, Stéphane JEAN BAPTISTE wrote:
> Hw could I copy a file in Perl
Take a look at File::Copy.
-- Brett
http://www.chapelperilous.net/btfwk/
First study the enemy. Seek w
> Hw could I copy a file in Perl
use File::Copy;
copy($file1, $file2);