Hi all
This is my first time on this mailing list, so i'll start with a Hello
(world) :)
I have a prob with my first script (i have read Learning Perl, and (not
yet readed) Programming Perl.
Now i want to make a simple tool to read my logs (i've started simple
with one log, i need to filter it later for only dropped packets from
the firewall, or errormessages in other logs etc.)
This is what i have so far:
#!/usr/bin/perl -w
open (ER,"/home/unicorn/Plscripts/error_log"); #opening error_log
open (EL, "home/unicorn/Plscripts/ERROR.LOG"); #opening ERROR.LOG
select (ERROR.LOG); #select ERROR.LOG to write
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.
But as i can see, i *did* open it (ofcourse i didn't, but what
happend... i thought the $_ would give all the info, readed bij <ER>.
Thanx for helping :)
Sander
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]