On Tue, 26 Oct 2004 10:57:39 -0500, JupiterHost.Net
<[EMAIL PROTECTED]> wrote:
> 
> 
> Kevin Old wrote:
> 
> > Hello everyone,
> >
> > First, this is a basic problem, but I have looked at it for over an
> > hour and wasted time.  Now, I'm asking for help.
> >
> > For some reason nothing is being printed to the MY filehandle. Can
> > someone see what I'm doing wrong?
> 
> Is
> 
>   if ( $_ =~ /40187378|40187233|40187230|4018722
> +9|40187234|40187232|40186526/ ) {
> 
> ever true?

Yes, it is true, lots and lots of lines.  I tried changing:

print MY $line;
to 
print {MY} $line;

and I get an error when using strict.

The weird thing is, that when I change the open statement from:

open(MY, "> /tmp/savedata/new/$_") or die "can't open new $_ $!\n";
to 
open(MY, ">> /tmp/savedata/new/$_") or die "can't open new $_ $!\n";

and append instead of write to the file, everything works.

Any ideas?

Kevin
-- 
Kevin Old
[EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to