Re: Problem with uploader

2008-11-22 Thread Adam Jimerson
On Friday 21 November 2008 11:23:11 am you wrote: On Tue, 2008-11-18 at 10:49 -0500, Adam Jimerson wrote: If the open failed then wouldn't the die kick in and at least say something in the server logs? Also how would one go around and get a more descriptive error message? For testing

Re: Problem with uploader

2008-11-22 Thread Owen
On Friday 21 November 2008 11:23:11 am you wrote: On Tue, 2008-11-18 at 10:49 -0500, Adam Jimerson wrote: If the open failed then wouldn't the die kick in and at least say something in the server logs? Also how would one go around and get a more descriptive error message? For testing

Re: need help with SpreadSheet::Parse perl module

2008-11-22 Thread Dr.Ruud
Stewart Anderson schreef: You can use Spreadsheet::WriteExcel to generate an Excel workbook. It has methods to add sheets and cell data and also lots of methods for formatting etc. The CPAN documentation is very clear and you will be able to use examples straight off the docs for

Perl code shows high usage in top - why?

2008-11-22 Thread sftriman
I have this code that looks through a series of files, and for each, counts the unique number of IP addresses over the past 20 minutes, then rewrites the file contents. It seems pretty simple - each of the 5 $site files has at most 100 or so IP entries it in - many files have 0-5 rows of data at

Date format search in the file

2008-11-22 Thread Sureshkumar M (HCL Financial Services)
Hi All, I want to find the string which are having the date inside the file. Please help me how do I match it,below is my program and it's not returning anything. #!/usr/bin/perl open(DATA,i)||die Unable to open the file; while(DATA) { if($_=~/(\d{2})([\W])\1\2\1]/) {

Re: Perl code shows high usage in top - why?

2008-11-22 Thread Mr. Shawn H. Corey
On Fri, 2008-11-21 at 23:51 -0800, sftriman wrote: I have this code that looks through a series of files, and for each, counts the unique number of IP addresses over the past 20 minutes, then rewrites the file contents. It seems pretty simple - each of the 5 $site files has at most 100 or

Re: Date format search in the file

2008-11-22 Thread Dermot
2008/11/22 Sureshkumar M (HCL Financial Services) [EMAIL PROTECTED]: Hi All, Hi #!/usr/bin/perl # Always use these, particularly when things aren't working as expected. use strict; use warnings; open(DATA,i)||die Unable to open the file; while(DATA) { if($_=~/(\d{2})([\W])\1\2\1]/)

Re: Date format search in the file

2008-11-22 Thread John W. Krahn
Sureshkumar M (HCL Financial Services) wrote: Hi All, Hello, I want to find the string which are having the date inside the file. Please help me how do I match it,below is my program and it's not returning anything. #!/usr/bin/perl use warnings; use strict; open(DATA,i)||die Unable to

Re: Date format search in the file

2008-11-22 Thread John W. Krahn
Dermot wrote: 2008/11/22 Sureshkumar M (HCL Financial Services) [EMAIL PROTECTED]: #!/usr/bin/perl # Always use these, particularly when things aren't working as expected. use strict; use warnings; open(DATA,i)||die Unable to open the file; while(DATA) { if($_=~/(\d{2})([\W])\1\2\1]/)

perl cumulative module question

2008-11-22 Thread ben perl
Is there a perl module to find cumulative in a column? It should subtract from the previous row and creates new column. For example, If i have the follow column in my file 2 6 9 It gives me 2 6-2 = 4 9-4 = 2 So the resulting column is 2 4 2 Hope I am using cumulative as the right word to

Re: perl cumulative module question

2008-11-22 Thread Jay Savage
On Sat, Nov 22, 2008 at 10:28 AM, ben perl [EMAIL PROTECTED] wrote: Is there a perl module to find cumulative in a column? It should subtract from the previous row and creates new column. For example, If i have the follow column in my file 2 6 9 It gives me 2 6-2 = 4 9-4 = 2 So the

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
ben perl wrote: Is there a perl module to find cumulative in a column? It should subtract from the previous row and creates new column. For example, If i have the follow column in my file 2 6 9 It gives me 2 6-2 = 4 9-4 = 2 So the resulting column is 2 4 2 Hope I am

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
Rob Dixon wrote: Your arithmetic is odd. You say 9-4 = 2 and so your resulting list should be (2,4,2). If you want to subtract the previous result from the next item in your data list each time then this will do the job. HTH, Rob use strict; use warnings; my @data =

Re: Attempting to use SFTP between Windows and Linux box

2008-11-22 Thread Rob Dixon
Wagner, David --- Senior Programmer Analyst --- WGO wrote: I have a couple of processes that run one on a production box and another on a test box. The production box script checks that a particular file is never more than 40 minutes old while on the test box, this checks that the actual

Small paying project: Perl DNS server

2008-11-22 Thread Kelly Jones
I'm trying to write a Perl DNS server that answers queries (A, NS, TXT, CNAME, LOC, MX, etc-- pretty much anything in http://en.wikipedia.org/wiki/List_of_DNS_record_types) based on the time of day, current weather in Paris, number of users on my server, the IP address of the requestor, a hash of

How Do I Auto-Run Perl in a Browser

2008-11-22 Thread statmatics
Index.html auto-runs for HTML. Index.php auto-runs for PHP. I can't find what auto-runs for Perl. Anything? Index.cgi? I must be doing something wrong. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Perl Call from Java dumps core while making a FTP connection

2008-11-22 Thread Srinivasan Ramaswami
Chas, Thanks, I have info here on the shell script and the perl script that I call from my java class. I see the fail happening as we try to make a FTP connection. I have not specified any PERLLIB as I see in my script. Thanks again, Srini ##myScript.ksh #!/bin/ksh

Re: Date format search in the file

2008-11-22 Thread sftriman
On Nov 22, 6:16 am, [EMAIL PROTECTED] (Dermot) wrote: 2008/11/22 Sureshkumar M (HCL Financial Services) [EMAIL PROTECTED]: Hi All, Hi #!/usr/bin/perl # Always use these, particularly when things aren't working as expected. use strict; use warnings; open(DATA,i)||die Unable to

how to use perl compare 2 binary files?

2008-11-22 Thread loody
Dear all: I try to use perl to compare 2 binary files, one is display content dump from Dram and another is display content calculated by my c-model code. I use open and binmode to open these 2 files, and use programs as below to do the comparison: $num_pattern=read PATTERN,

Re: how to use perl compare 2 binary files?

2008-11-22 Thread loody
Does that mean I should use ne instead of !=? BTW, is there any faster default function provide by Perl library to compare 2 binary files? thanks for your help, miloody -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how to use perl compare 2 binary files?

2008-11-22 Thread Rodrick Brown
Check using a hash of the binary using something like MD5::Digest or something. On Sat, Nov 22, 2008 at 11:49 PM, loody [EMAIL PROTECTED] wrote: Does that mean I should use ne instead of !=? BTW, is there any faster default function provide by Perl library to compare 2 binary files? thanks

Re: how to use perl compare 2 binary files?

2008-11-22 Thread loody
2008/11/23 loody [EMAIL PROTECTED]: Does that mean I should use ne instead of !=? BTW, is there any faster default function provide by Perl library to compare 2 binary files? thanks for your help, Hi: forget to explain my question more specifically. I need to compare 2 YUV format image files.

script ok but produce error when run in a homepage

2008-11-22 Thread itshardtogetone
Hi, Looking at the script below which when uploaded into my homepage in wave.prohosting.com, and when I ran the script, I got an error which says Error 500 Internal Server Error . After several debugging, I realised that if I comment-out the shuffle-module (#use Algorithm::Numerical::Shuffle

Re: script ok but produce error when run in a homepage

2008-11-22 Thread Raymond Wan
Hi, itshardtogetone wrote: Hi, Looking at the script below which when uploaded into my homepage in wave.prohosting.com, and when I ran the script, I got an error which says Error 500 Internal Server Error . After several debugging, I realised that if I comment-out the shuffle-module

how to read file content into an array?

2008-11-22 Thread loody
Dear all: The prototype of read is read FILEHANDLE,SCALAR,LENGTH ex: read PATTERN, $line, 1920; that means the $line will content 1920 bytes. if I want to modify the byte offset 720 of $line, it seems impossible, since $line is a scalar not an array. I know I can read a byte to each array element