From: Jamie C. <jca...@we...> - 2003-12-29 03:25:44
|
Larry Gilson wrote: > >>-----Original Message----- >>From: Jamie Cameron >> >>Are you perhaps setting the $/ variable somewhere in your >>code? If set to undef, perl will read a whole file at once >>with code like >> >>$data = <FH>; >> >>or the whole file into the first element of the array with code >>like : >> >>@data = <FH>; > > > No. I can actually force this code to read my procmaillog without a > problem. It is only the maillog that I am having a problem with. I also > have code like the following in reports-lib.pl and it works without a > problem. > > > # > #### Week-to-Date Merlin/Procmail Log Report > # > elsif ($match_exp eq "procmaillog") { > open(PLOG, $logfile); > while (<PLOG>) { > $output = 1; > print &html_escape($_); > } > close (PLOG); > } > # > > > I also tried to use a while loop instead of a foreach but I get the same > results - as I would suspect. So this problem only happens for a single log file (mailog), and works for procmaillog without the code being changed? Perhaps one of those files has lines ending with \r\n, while the other ends with just \n - Jamie |