Hello Monks! Been a long time, but I am in need of some expert knowledge. I have literally fought with this issue all day and it's driving me nuts. Every time I run the script I am getting "Could not open Server IN2 (/tmp/CommonLog.10.10.10.10): No such file or directory". Yet, I can run ls, head, more, cat, etc against /tmp/CommonLog.10.10.10.10 all day long with no issues. Why would Perl think the file doesn't exist when it plainly does.
foreach my $server (@servers) {
open IN2, "<", $provinfile.$server or die "Could not open Serv
+er IN2 ($provinfile.$server): $!\n";
open OUT2, ">", $provoutfile or die "Could not open OUT2: $!\n
+";
while (<IN2>)
{
if (/\<13\>/../END OF REPORT/) {
#next if /PROXY500/ || /END OF REPORT/;
print OUT;
}
}
}
close(OUT2);
close(IN2);
If you see anything wrong or have any thoughts on where I can go from here (went about 40 different ways today and all dead ends), I would appreciate any assistance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.