On Nov 16, Sander said:

>open (ER,"/home/unicorn/Plscripts/error_log"); #opening error_log
>open (EL, "home/unicorn/Plscripts/ERROR.LOG"); #opening ERROR.LOG

I have a feeling you're missing the leading '/' for that second file.

You should never open a file without being sure it worked:

  open FILE, "< $filename" or die "can't read $filename: $!";

The $! variable holds the system error message, if something goes wrong.

>select (ERROR.LOG);                    #select ERROR.LOG to write

Wrong; you need to use the filehandle:

  select(EL);

> while (<ER>) {                                #as long as ER is open, read....
>      chomp;
>     print "$_";                       #print output to ERROR.LOG
> } select (STDOUT);                    #make sure STDOUT is normal again

>It is giving the message that print has an unopened filehandle ERRORLOG
>at line 7.

Right, because there is no ERRORLOG filehandle, only ER and EL.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to