I don't have the original email, so I'm having to reply to the original
question here (see the end of the email), as well as the response.
On Sat, Jul 28, 2001 at 01:56:10PM -0400, Akshay Arora wrote:
> @temp=; #implies that TEMP is a read file handle
> print TEMP @temp; #implies that TEMP is a
@temp=; #implies that TEMP is a read file handle
print TEMP @temp; #implies that TEMP is a write file handle.
I'm pretty sure that you can only do either read or write, but not both
to the same FILE HANDLE. You can open 2 handles to the same file (which
can cause a few problems...), but if you ar
ok, first, what are you trying to do?
secondly, dont put a filehandle in an array.. it's A BAD THING!
this means you're slurping the entire file into memory, as well as having to
allocate a bit of extra memory for perl to understand each line should be a
different value of the array.
if you're si
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 work ?
Define "doesn't work"
>
> #!/usr/bin/perl
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 ($_ =~m/ancre/);
>
>
> }
Hard to say without knowing what erro