Thanks Bob,
I discovered this when using Mark's suggestion.
[snip]
You haven't read a row from SITELOG. So the regex below is checking the
row
from your SITES file.
>
> # Check the file for any ORA- entries
>
> if($_ =~ m/ORA-/) {
>
> # If it contains records, reverse the file
>
> my @lines = reverse($_);
The call to reverse() is doing nothing here. You're just assigning the
scalar $_ to the array @lines, which will have one element following the
assignment.
Are you just trying to report the ORA-XXX errors in reverse order? If
so,
something like this should work:
my @errs;
while (<SITELOG>) {
push @errs, $_ if /ORA-/;
}
print reverse @errs;
Thanks for this, it is neater than my solution!
Regards
Denham
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>