Re: to copy a file (with perl)

2001-06-25 Thread Stéphane JEAN BAPTISTE
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;

RE: to copy a file (with perl)

2001-06-25 Thread Paul Jasa
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

Re: to copy a file (with perl)

2001-06-25 Thread Paul
--- 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

Re: to copy a file (with perl)

2001-06-25 Thread Jeff 'japhy' Pinyan
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 $_

Re: to copy a file (with perl)

2001-06-25 Thread Aaron Craig
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

Re: to copy a file (with perl)

2001-06-25 Thread Paul
--- 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

Re: to copy a file (with perl)

2001-06-25 Thread Brett W. McCoy
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

Re: to copy a file (with perl)

2001-06-25 Thread Me
> Hw could I copy a file in Perl use File::Copy; copy($file1, $file2);