Re: Reading quickly from the end of a file

2007-02-09 Thread Chris Wagner
At 02:58 PM 2/8/2007 -0800, John Townsend wrote:
>I'm looking for a way to read the end of a file quickly. I have scripts
>that generate PostScript files (basically really large text files). I'd
>like to verify that each PostScript file ends with "%EOF". Rather than
>read the entire text file into memeory then parsing each line, I'd like
>to read from the bottom the file and search for the "%EOF" string.

Hi.

open FILE, "megafile.ps" or die;
seek FILE, -4, 2;
read FILE, $buffer, 4;
($buffer eq '%EOF') ? print "valid postscript" : print "invalid postscript";



--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Assistance with Spreadsheet::WriteExcel Formula

2007-02-09 Thread Nichols, Ron
I am generating a spreadsheet using Spreadsheet::WriteExcel.  Everything
is working fine except a formula containing =SUMIF(A5:A10, C15,C5:C10).
The formula gets generated correctly in the spreadsheet but in order to
get the resulting value to be displayed in the cell, you have to edit
the cell (i.e., click in the edit bar, hit enter).  After performing an
edit (without changing anything), the formula is evaluated correctly and
displays the value.

Is there any way to get the formula to evaluate without having to edit
the cell?  The spreadsheets that I am creating are locked so the user
cannot make changes to the formulas.  The script that creates the
spreadsheet will create hundreds of spreadsheets each time it is run.

I have attempted to force a recalculation of the spreadsheet from within
Excel but that does not solve the issue.

The version of the module as shown from PPM query is:
Spreadsheet-WriteExcel-Simple [0.03] A simple single-sheet Excel
document

Your assistance is appreciated.


Ronald G. Nichols
Director of Information Technology
Knouse Foods Cooperative
717 677-7111 Ext. 3470
[EMAIL PROTECTED]


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs