Re: Please help: perl run out of memory

2022-04-27 Thread David Emanuel da Costa Santiago
Às 11:33 de 17/04/22, wilson escreveu: hello the experts, can you help check my script for how to optimize it? currently it was going as "run out of memory". $ perl count.pl Out of memory! Killed My script: use strict; my %hash; my %stat; To be honest you don't need the %stat, however

Re: Please help: perl run out of memory

2022-04-26 Thread hw
On Sun, 2022-04-17 at 17:33 +0800, wilson wrote: > hello the experts, > > can you help check my script for how to optimize it? > currently it was going as "run out of memory". > > $ perl count.pl > Out of memory! > Killed I would use a database like Mariadb for this, not only to create a repor

Re: Please help: perl run out of memory

2022-04-22 Thread David Precious
On Thu, 21 Apr 2022 07:12:07 -0700 al...@coakmail.com wrote: > OP maybe need the streaming IO for reading files. Which is what they were already doing - they used: while () { ... } Which, under the hood, uses readline, to read a line at a time. (where "HD" is their global fileh

Re: Please help: perl run out of memory

2022-04-21 Thread alice
OP maybe need the streaming IO for reading files. Thanks On 2022-04-21 21:56, David Precious wrote: > On Thu, 21 Apr 2022 17:26:15 +0530 > "M.N Thanishka sree Manikandan" wrote: > >> Hi wilson >> Try this module file::slurp > > Given that the OP is running into memory issues processing an 80

Re: Please help: perl run out of memory

2022-04-21 Thread David Precious
On Thu, 21 Apr 2022 17:26:15 +0530 "M.N Thanishka sree Manikandan" wrote: > Hi wilson > Try this module file::slurp Given that the OP is running into memory issues processing an 80+ million line file, I don't think suggesting a CPAN module designed to read the entire contents of a file into mem

Re: Please help: perl run out of memory

2022-04-21 Thread M.N Thanishka sree Manikandan
Hi wilson Try this module file::slurp Regards, Manikandan On Sun, 17 Apr, 2022, 15:03 wilson, wrote: > hello the experts, > > can you help check my script for how to optimize it? > currently it was going as "run out of memory". > > $ perl count.pl > Out of memory! > Killed > > > My script: > u

Re: Please help: perl run out of memory

2022-04-21 Thread Adriel Peng
I am not sure, but can Tie::Hash etc be used by tying hash to a local file to reduce the memory use? regards.

Re: Please help: perl run out of memory

2022-04-18 Thread Rob Coops
Hi Wilson, Looking at the script I see some room for improvement. You currently declare %hash as a global variable, and keep it around forever. With tens of millions of rows that is quite a large structure to just have sitting around after you have build the %stat hash. So I would start by limitin

Re: Please help: perl run out of memory

2022-04-17 Thread David Mertens
I see nothing glaringly inefficient in the Perl. This would be fine on your system if you were dealing with 1 million items, but you could easily be pushing up against your system's limits with the generic data structures that Perl uses, especially since Perl is probably using 64-bit floats and int

Re: Can you please Help perl readdir multiple folders and files with pre same name

2009-12-18 Thread Robert Wohlfarth
On Fri, Dec 18, 2009 at 7:13 AM, Simphiwe Mkhize wrote: > Here is my solution thank you for help > > .. > > &my_read_dms_booking_folders('c:/bookings') ; > > sub my_read_dms_booking_folders{ > > my ($bookingspath) = @_ ; > > opendir(DIR, "$bookingspath") or die "cant open $bookingspath: $!\n";

Re: Can you please Help perl readdir multiple folders and files with pre same name

2009-12-18 Thread Shlomi Fish
On Friday 18 Dec 2009 15:13:24 Simphiwe Mkhize wrote: > Here is my solution thank you for help > What? Have you read what I wrote to you? You didn't reply. This code still contains many bad and ancient Perl paradigms that I've pointed to you. Please read what I've written and correct your new c

Re: Can you please Help perl readdir multiple folders and files with pre same name

2009-12-18 Thread Simphiwe Mkhize
Here is my solution thank you for help .. &my_read_dms_booking_folders('c:/bookings') ; sub my_read_dms_booking_folders{ my ($bookingspath) = @_ ; opendir(DIR, "$bookingspath") or die "cant open $bookingspath: $!\n"; while(defined(my $folder = readdir(DIR))) { if ($folder eq '.') { n

Re: Can you please Help perl readdir multiple folders and files with pre same name

2009-12-17 Thread Shlomi Fish
On Thursday 17 Dec 2009 17:07:19 Simphiwe Mkhize wrote: > Please Help > > I have multiple folders want to read trough each folder and search for > certian file. I have code which is working fine but does not do what I > want. I dont want to hard code path as it read different folder within You

Can you please Help perl readdir multiple folders and files with pre same name

2009-12-17 Thread Simphiwe Mkhize
Please Help I have multiple folders want to read trough each folder and search for certian file. I have code which is working fine but does not do what I want. I dont want to hard code path as it read different folder within sub get_phone_log { #---

Re: Help: Perl Module Installation Issue(s)

2007-04-28 Thread Chas Owens
On 4/27/07, Jefferson Kirkland <[EMAIL PROTECTED]> wrote: snip OpenSSL.xs:5:25: error: openssl/bio.h: No such file or directory OpenSSL.xs:6:25: error: openssl/err.h: No such file or directory OpenSSL.xs:7:25: error: openssl/pem.h: No such file or directory OpenSSL.xs:8:25: error: openssl/evp.h:

Re: Help: Perl Module Installation Issue(s)

2007-04-28 Thread Peter Scott
On Sat, 28 Apr 2007 08:59:40 -0400, Jefferson Kirkland wrote: > Hmm, well then. I guess this is going to be one of those lost causes at > the moment. ***sigh*** What is it you think you need this module for and why? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- T

Re: Help: Perl Module Installation Issue(s)

2007-04-28 Thread Jefferson Kirkland
Hmm, well then. I guess this is going to be one of those lost causes at the moment. ***sigh*** Thanks to Tom and Mumia for all their input. Best regards, Jeff On 4/27/07, Mumia W. <[EMAIL PROTECTED]> wrote: On 04/27/2007 07:13 PM, Jefferson Kirkland wrote: > [...] > I was doing fine unt

Re: Help: Perl Module Installation Issue(s)

2007-04-27 Thread Mumia W.
On 04/27/2007 07:13 PM, Jefferson Kirkland wrote: [...] I was doing fine until today. I tried the following: perl -MCPAN -e 'install OpenSSL' Things started ok, but quickly took a down turn/nose dive into the pavement. The install failed horribly [...] Probably the OpenSSL Perl mo

Re: Help: Perl Module Installation Issue(s)

2007-04-27 Thread Tom Phoenix
On 4/27/07, Jefferson Kirkland <[EMAIL PROTECTED]> wrote: Running make for O/OE/OESI/OpenSSL-0.09.tar.gz You seem to be trying to install version 0.09 of a module. Version numbers below 1.0 are pre-releases, by convention, and may not be finished. Have you read that module's README file? h

Help: Perl Module Installation Issue(s)

2007-04-27 Thread Jefferson Kirkland
Hello all! I am hoping that someone here can point me in the right direction. Before I get right into the issue(s) I am experiencing, allow me to digress into the background of this story. I recently decided, after much deliberation, to install Ubuntu Feisty on my system. It was great, recogni

Re: Help -Perl parsing script

2004-04-19 Thread Rob Dixon
Wc -Sx- Jones wrote: > > Ron McKeever wrote: > > Thank you for replying. > > > > Actually there are 7 columns the last one got cut off in the email. > > The column im working on is the 6th. > > > > Thats why i thought i needed to split it? > > >>RIp > >> - - -

Re: Help -Perl parsing script

2004-04-17 Thread WC -Sx- Jones
Ron McKeever wrote: Thank you for replying. Actually there are 7 columns the last one got cut off in the email. The column im working on is the 6th. Thats why i thought i needed to split it? RIp - - ---- - 1074715516 11

Re: Help -Perl parsing script

2004-04-17 Thread WC -Sx- Jones
Ron McKeever wrote: RIp - - ---- - 1074715516 111 222.222.2.2 2566 111.111.111.180 111.111.111.1 1074715516 222 .3584 .80 . 1074715516 400 .

Help -Perl parsing script

2004-04-17 Thread Ron McKeever
Can someone point me in the right direction?? I am trying to figure out my Perl parsing script to dump the interesting part of my log files to another parsed file. Bascially I want to try an remove "Dport" rows that contain 80,53,25, etc... Those are tabs between each field. Log File name "lo

Re: Help! Perl Substitution

2004-02-19 Thread Jeff Westman
WC -Sx- Jones <[EMAIL PROTECTED]> wrote: > Jeff Westman wrote: > > > When I ran this > > > >$ perl -ne 's/|^NEWLINE^|^/\n/g;print' loadFile > > The program loads the ENTIRE loadfile and then splits characters > at > whitespace "between" characters and then prints every character > followe

Re: Help! Perl Substitution

2004-02-19 Thread WC -Sx- Jones
Jeff Westman wrote: When I ran this $ perl -ne 's/|^NEWLINE^|^/\n/g;print' loadFile The program loads the ENTIRE loadfile and then splits characters at whitespace "between" characters and then prints every character followed by a newline. So, how big is loadfile? __Sx_

Re: Help! Perl Substitution

2004-02-19 Thread Jeff Westman
Paul Johnson <[EMAIL PROTECTED]> wrote: > On Thu, Feb 19, 2004 at 04:36:55PM -0800, david wrote: > > Jeff Westman wrote: > > > > > I'm trying to help out another developer with a mini-Perl > script. > > > He has a file that contains one very long line, about 28M in > size. > > > He needs to do a

Re: Help! Perl Substitution

2004-02-19 Thread david
Paul Johnson wrote: >> >> [panda]# perl -ne 'BEGIN{$/=\10} s/\|\^NEWLINE\^\|\^/\n/g; print' >> [loadFile > > The trouble with this approach is that you will miss any separators > which are split. Your example actually reads 10 bytes at a time, but > using $/ is the right idea: > > perl -ple

Re: Help! Perl Substitution

2004-02-19 Thread Paul Johnson
On Thu, Feb 19, 2004 at 04:36:55PM -0800, david wrote: > Jeff Westman wrote: > > > I'm trying to help out another developer with a mini-Perl script. > > He has a file that contains one very long line, about 28M in size. > > He needs to do a replacement of all occurances of > > > > |^NEWLINE^|

Re: Help! Perl Substitution

2004-02-19 Thread david
Jeff Westman wrote: > I'm trying to help out another developer with a mini-Perl script. > He has a file that contains one very long line, about 28M in size. > He needs to do a replacement of all occurances of > > |^NEWLINE^|^ > > to a literal newline (HPUX, 0x0a or "\n"). > > When I ran thi

Help! Perl Substitution

2004-02-19 Thread Jeff Westman
I'm trying to help out another developer with a mini-Perl script. He has a file that contains one very long line, about 28M in size. He needs to do a replacement of all occurances of |^NEWLINE^|^ to a literal newline (HPUX, 0x0a or "\n"). When I ran this $ perl -ne 's/|^NEWLINE^|^/\n/

RE: Please Help: Perl-TK: how to get a double-click in one Listbox?

2003-09-25 Thread Wiggins d'Anconia
On Thu, 25 Sep 2003 19:34:52 +0530, "Chetak Sasalu M" <[EMAIL PROTECTED]> wrote: > > Hi, > Any place to ask perl-xml questions and questions about schema? All of the lists hosted by perl.org are available on a Lists List page at: http://lists

RE: Please Help: Perl-TK: how to get a double-click in one Listbox?

2003-09-25 Thread Chetak Sasalu M
bject: RE: Please Help: Perl-TK: how to get a double-click in one Listbox? On Thu, 25 Sep 2003 08:09:23 +0200, [EMAIL PROTECTED] wrote: > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sen

RE: Please Help: Perl-TK: how to get a double-click in one Listbox?

2003-09-25 Thread Wiggins d'Anconia
On Thu, 25 Sep 2003 08:09:23 +0200, [EMAIL PROTECTED] wrote: > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 24, 2003 3:29 PM > To: [EMAIL PROTECTED] > Subject: Perl-TK: how to get

Please Help: Perl-TK: how to get a double-click in one Listbox?

2003-09-24 Thread Marcos . Rebelo
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 3:29 PM To: [EMAIL PROTECTED] Subject: Perl-TK: how to get a double-click in one Listbox? lets say -commandDoubleClick => sub {$self->onDCListbox()} thanks MArcos -- To unsubscri

Re: help perl needed

2003-07-03 Thread Sudarshan Raghavan
vemulakonda uday bhaskar wrote: hi all This is the fifth time you have posted the same mail. Please avoid this, it is annoying i have got a code for file transger between two linux systems through ssh here is the code Did you run this code and see what happens? #!usr/bin/perl when y

help perl needed

2003-07-03 Thread vemulakonda uday bhaskar
hi all i have got a code for file transger between two linux systems through ssh here is the code #!usr/bin/perl use Net::SSH qw(sshopen2); my $user="username"; my $host="hostname"; my $cmd="commanad"; sshopen2("[EMAIL PROTECTED]",*REAEDR,*WRITER,"$cmd") or die "ssh :$!"; while() { chom

Re: Help perl

2003-06-29 Thread Sudarshan Raghavan
vemulakonda uday bhaskar wrote: hi all This is the 5'th copy of your mail, please don't send multiple copies thanks for the reply. i got the Net::FTP module installed and my code is working my code is as follows : #!usr/bin/perl use Net::FTP; $ftp=Net::FTP->new("192.168.255.xxx") or dir

Help perl

2003-06-29 Thread vemulakonda uday bhaskar
hi all thanks for the reply. i got the Net::FTP module installed and my code is working my code is as follows : #!usr/bin/perl use Net::FTP; $ftp=Net::FTP->new("192.168.255.xxx") or dir "Cannot be connected"; $ftp->login("",""); $ftp->get("filename"); this is for file transfer through FT

Help perl

2003-06-29 Thread vemulakonda uday bhaskar
hi all thanks for the reply. i got the Net::FTP module installed and my code is working my code is as follows : #!usr/bin/perl use Net::FTP; $ftp=Net::FTP->new("192.168.255.xxx") or dir "Cannot be connected"; $ftp->login("",""); $ftp->get("filename"); this is for file transfer through FT

Help perl

2003-06-29 Thread vemulakonda uday bhaskar
hi all thanks for the reply. i got the Net::FTP module installed and my code is working my code is as follows : #!usr/bin/perl use Net::FTP; $ftp=Net::FTP->new("192.168.255.xxx") or dir "Cannot be connected"; $ftp->login("",""); $ftp->get("filename"); this is for file transfer through FT

Help perl

2003-06-29 Thread vemulakonda uday bhaskar
hi all thanks for the reply. i got the Net::FTP module installed and my code is working my code is as follows : #!usr/bin/perl use Net::FTP; $ftp=Net::FTP->new("192.168.255.xxx") or dir "Cannot be connected"; $ftp->login("",""); $ftp->get("filename"); this is for file transfer through FT

RE: help perl ftp

2003-06-27 Thread Aman Thind
xplanation** click on perl-5.8.0 \ libnet-1.16 placed directly below it and you'll be transferred to the download page. -Original Message- From: vemulakonda uday bhaskar [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 6:05 PM To: [EMAIL PROTECTED] Subject: help perl ftp Hi AALL t

RE: help perl ftp

2003-06-27 Thread Darbesio Eugenio
-Original Message- ... >>>thoughi searched http://search.cpan.org/, i couldnot get the >>>p[lace from where i can download NEt::FTP. I on;y got is a >>>theorotical explanation of Net::FTP ... Try http://search.cpan.org/, then search for Net::FTP, choice the second one in the list, clic

help perl ftp

2003-06-27 Thread vemulakonda uday bhaskar
Hi AALL thoughi searched http://search.cpan.org/, i couldnot get the p[lace from where i can download NEt::FTP. I on;y got is a theorotical explanation of Net::FTP please help me in this regads with regards uday bhaskar ___ Click below to experie

help perl+ftp

2003-06-27 Thread vemulakonda uday bhaskar
Dear all From where i can download Net::FTP module to install it in my system With Regards V.V. Uday Bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kar

Re: help - perl ssh

2003-06-26 Thread Janek Schleicher
Vemulakonda Uday Bhaskar wrote at Thu, 26 Jun 2003 12:41:16 +: > i have wriiten a code for file tranfer between linux systems > so i used Net::SCP qw(scp iscp). > > i downloaded it from the site > http://serach.cpan.org/author/IVAN > > but after gunzip and tar -xvf.. > when i gave the comma

help - perl ssh

2003-06-26 Thread vemulakonda uday bhaskar
hello to all first of all i would like to pay my regrets for my earlier mail asking the code. sorry for that. i have wriiten a code for file tranfer between linux systems so i used Net::SCP qw(scp iscp). i downloaded it from the site http://serach.cpan.org/author/IVAN but after gunzip and tar -

Re: help perl

2003-06-26 Thread Sudarshan Raghavan
vemulakonda uday bhaskar wrote: sir Please don't address me as sir, sudarshan would do as u asked me to do i have gone thru the below site for ssh tranfer of files in two linux systems http://search.cpan.org/author/IVAN/Net-SCP-0.06/SCP.pm I would appreciate it if you would keep this threa

RE: Help perl gurus

2002-11-26 Thread wiggins
An excellent article about your problem: http://perl.plover.com/FAQs/Namespaces.html You should be doing: use strict; use warnings; This will produce somewhat cryptic messages until you get used to it but then it will save you lots of time... http://danconia.org -

Re: Help perl gurus

2002-11-26 Thread Paul Johnson
Johnstone, Colin said: > Gidday all, > > I have written what I will refer to as an include file ( php speak ) and > named it press_config.pl The contents is the initialisation of the In Perl it would probably be called a library - hence the pl extension. Perl Library. > variables that I wish to

RE: Help perl gurus

2002-11-26 Thread NYIMI Jose (BMB)
perldoc -f do José. > -Original Message- > From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 7:58 AM > To: '[EMAIL PROTECTED]' > Subject: Help perl gurus > > > Gidday all, > > I have written what I will re

Help perl gurus

2002-11-25 Thread Johnstone, Colin
Gidday all, I have written what I will refer to as an include file ( php speak ) and named it press_config.pl The contents is the initialisation of the variables that I wish to use across my mailinglist application. It is below. First problem When I use the require statement to call this file

Re: Please help - perl system function

2002-05-23 Thread John W. Krahn
Frank Wu wrote: > > Hi guys, Hello, > I have a perl script using system function, owner is root, like, > > print "Previous $?, $!" ; > system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 > or die "Unable to create directory,$!, $?" > > system function

Re: Please help - perl system function

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 04:13 , Frank Wu wrote: > I have a perl script using system function, owner is root, like, > > print "Previous $?, $!" ; > system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 > or die "Unable to create directory,$!, $?" > > system

Please help - perl system function

2002-05-23 Thread Frank Wu
Hi guys, I have a perl script using system function, owner is root, like, print "Previous $?, $!" ; system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 or die "Unable to create directory,$!, $?" system function sometimes return non-zero value, $? is -1

Help...Perl CGI generating core file

2001-10-25 Thread Rajeev Nalluri
Hi, I had a cgi script in Perl. It takes few values in the HTML FORM from the user and then does database update and prints back the results on the webpage. Approximately 1 in 20 times, it is not working as it is supposed to do. It is giving 'Internal Server Error' and generating a core file. Ana