;>file"); #append mode
open(TEMP, "+ COLLINEAU Franck FTRD/DMI/TAM wrote:
> >
> > this code doesn't work:
> >
> > @temp=;
> > $temp[2]="";
> > $temp[3]="";
> > $temp[4]="";
f you are trying to write to a 2nd
file, use a different file handle
open(TEMP,">file"); #append mode
@temp = ;
...
print TEMP2 @temp;
#poor use of variable all around, but you get the point.
-Akshay
COLLINEAU Franck FTRD/DMI/TAM wrote:
>
> this code doesn't work:
>
&
ata
furthermore make sure you open your file handle with:
open FH, "+>thefile.txt" to have both read and write access, since you're
both reading AND writing to the file in your code.
hth
Jos Boumans
> this code doesn't work:
>
> @temp=;
> $temp[2]="";
>
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."
i think you want to use 'unless' instead of 'until'.
also, take advantage of $_'s magic in your print statement:
print TEMP unless /ancre/;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -Original Message-
> From: COLLINEAU Franck FTRD/DMI/TAM
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 11:12 AM
> To: Perl (E-mail)
> Subject: code doesn't work
>
>
> Hi,
>
> Can anybody tell me why this code doesn't wor
On Thu, 26 Jul 2001, COLLINEAU Franck FTRD/DMI/TAM wrote:
> 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
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]