À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
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
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
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
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
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
I am not sure, but can Tie::Hash etc be used by tying hash to a local file
to reduce the memory use?
regards.
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
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
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";
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
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
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
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 {
#---
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:
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
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
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
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
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
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
> >> - - -
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
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 .
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
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
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_
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
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
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^|
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
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/
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
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
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
-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
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
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
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
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
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
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
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
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
-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
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
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
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
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 -
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
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
-
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
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
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
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
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
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
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
57 matches
Mail list logo