Hi folks,
I have a Perl script that creates a large hash, from a collection of
files. I am running Perl 5.6.1 on SMP Linux 2.4.18, top shows my process
using up to 700MB of memory (which is fine on our servers). I have
noticed though that when perl hits my
exit 0;
line, the process pauses for
>
> It could be garbage collection, but it shouldn't take 2 minutes to
> free() 700MBs of data. Could be that your code is written in such
> a way that it is having to back out of lots of subroutines and
> free'ing things as it goes? Such as with recursion?
no recursion, and on
Why not:
my $spec = "/var/www/*.mp3";
my ( @files ) = glob $spec;
print "Checked '$spec' - found ", scalar(@files), " files:\n ",
join("\n ", @files ), "\n";
regards
Jeff
> -Original Message-
> From: Fabian Funk [mailto:[EMAIL PROTECTED]]
> Sent: 04 September 2002 20:4
I have used Perl for a while, and always used dumpvar.pl /
main::dumpvalue() to dump out things (I guess that tells you how long!
8-))
I had a look at Data::Dumper - but its dumps are either too terse (i.e.
all one line) or too verbose (i.e. I am dumping data structures and
don't really need to w
Try
@lines = `/usr/local/bin/ssh -l priss remotehost cat list-txt`;
and then skip any blank lines at this end...
foreach my $line ( @lines ) {
chomp $line;
next unless $line;
}
regards
Jeff
> -Original Message-
> From: Priss [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 200
> -Original Message-
> From: Mariusz [mailto:[EMAIL PROTECTED]]
> Sent: 09 September 2002 05:59
> To: perl
> Subject: perl and my DB...
>
> (Can I submit the record via DBI and read the primary key
> "ID" within the same script. Other words, can I send the last
> name creating a new
> -Original Message-
> From: Javeed SAR [mailto:[EMAIL PROTECTED]]
> Sent: 09 September 2002 11:25
> To: Sudarshan Raghavan; Perl beginners
> Subject: RE: change directories
>
>
> Hi,
>
> I printed the statement:
> print cwd;
> it's in right path, but the program comes out in c:\, i wa
> -Original Message-
> From: Mike Singleton [mailto:[EMAIL PROTECTED]]
> Sent: 11 September 2002 04:40
> To: [EMAIL PROTECTED]
> Subject: new output error
>
>
> The output file (myfile.csv) is blank... any ideas out there? Thanks!
>
> print OUT join (',', @f) . "\n" if
>/$JOBST
> -Original Message-
> From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]]
> Sent: 13 September 2002 10:30
> To: [EMAIL PROTECTED]
> Subject: when does a program get __DIE__
>
> Can anyone tell me under what conditions does a program get SIGNAL
> __DIE__ under linux
>
> if I
Folks,
I want to sort my masked hashes into neat little piles for easier
digestion:
Please note this is _example_ data 8-)
my $h = {
a => { name => 'apple', taste => 3 },
b => { name => 'peach', taste => 2 },
c => { name => 'banana', taste => 2 },
}
I want to sort first on taste and then
> -Original Message-
> From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]]
> Sent: 17 September 2002 14:44
> To: [EMAIL PROTECTED]; Jeff Aa
> Cc: [EMAIL PROTECTED]
> Subject: Re: sorting a hash - multiple key fields
>
>
> Use this . I think you wud
> -Original Message-
> From: Sudarshan Raghavan [mailto:[EMAIL PROTECTED]]
> Sent: 19 September 2002 23:57
> To: Perl beginners
> Subject: Re: Regexp
>
>
> On Wed, 18 Sep 2002, Panel Vincent - A53 wrote:
>
> > I would like to reformat names like
> >
> > Francois de la Varenne
> >
> -Original Message-
> From: Janek Schleicher [mailto:[EMAIL PROTECTED]]
> Sent: 18 September 2002 16:34
> To: [EMAIL PROTECTED]
> Subject: Re: lots of numbers...
>
>
> I think, it's better to weight the sorted numbers
> with their sum rank, in the above example it would be:
>
> Of c
> -Original Message-
> From: David Samuelsson (PAC)
> [mailto:[EMAIL PROTECTED]]
> Sent: 19 September 2002 08:09
> To: '[EMAIL PROTECTED]'
> Subject: Using GetOpt::Long
>
>
> I found this module was a part off the package, and tried it
> out, it works as i want. I have some troubles
> -Original Message-
> From: David Samuelsson (PAC)
> [mailto:[EMAIL PROTECTED]]
> Sent: 19 September 2002 09:03
> To: 'Jeff AA'; [EMAIL PROTECTED]
> Subject: RE: Using GetOpt::Long
>
>
> I want it so it will execute the subs in the order accor
> -Original Message-
> From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]]
> Sent: 19 September 2002 11:18
> To: [EMAIL PROTECTED]
> Subject: wordswap script
>
>
> Hi All
>
>I am writing a script that will replace all instance of a
> particular
> word another in a file
>
>
> -Original Message-
> From: Janek Schleicher [mailto:[EMAIL PROTECTED]]
> Sent: 19 September 2002 16:47
> To: [EMAIL PROTECTED]
> Subject: RE: lots of numbers...
>
> I liked your algorithm as it is quick and easy.
> But on the other hand the results aren't as good as possible.
Actuall
Lots of good answers so far about using arrays, hashes etc, so
won't bother going there... look below to see an OOP that works
efficiently, using NAMEs rather than refs.
> -Original Message-
> From: Zielfelder, Robert
> [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 18:44
> To: '
> -Original Message-
> From: Bruno Negrao [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 23:49
> To: [EMAIL PROTECTED]
> Subject: dbmopen doesn't work
>
>
> Hi all,
> Could someone say to me why this program doesn't run? (it
> doesn't print the database values)
>
> #!/usr/bin/p
If *nix, look at help for the open3 function. Attached as a text file is
the little run class that I use to do this.
Here is an example of how to use this class to encapsulate GPG, where
the passphrase gets written to stdin of the child process, and the
results are reaped from the childs stder
tember 2002 16:20
> To: Jeff AA
> Cc: [EMAIL PROTECTED]
> Subject: RE: Programming pipes to and from another program
>
>
>
>
> >If *nix, look at help for the open3 function. Attached as a
> text file is
> >
> >the little run class that I use to do
I need to determine the highest common factor for a series of integers.
I have scribed an initial stab included below - does anyone have a
better HCF implementation, or any improvements to suggest?
TIA
Jeff
#!/usr/local/bin/perl -w
use strict;
my ( $one, $two ) = @ARGV;
$one = 37894060279 unle
> -Original Message-
> From: dan [mailto:[EMAIL PROTECTED]]
> Sent: 30 September 2002 13:55
> To: [EMAIL PROTECTED]
> Subject: Re: SQL Table Rows
>
>
snip
> __ START __
> $id = 1;
> $sth = $dbh->prepare("SELECT * FROM table WHERE id=$id");
> $sth->execute;
> @ary = $sth->fetchrow_array
> -Original Message-
> From: Theuerkorn Johannes [mailto:[EMAIL PROTECTED]]
> Sent: 30 September 2002 10:18
> To: '[EMAIL PROTECTED]'
> Subject: how to know weather perl script is already running?
>
>
> Hello List,
>
> i have a perl script that i have running from a cron Job. It
> us
> -Original Message-
> From: folschette [mailto:[EMAIL PROTECTED]]
> Sent: 16 October 2002 08:19
> To: [EMAIL PROTECTED]
> Subject: RE: Backup Program?
>
>
>
> hi
> and how do this in unix?
> cio
OT as this is not Perl
A nice easy option is rsync
http://www.google.com/search?sourc
25 matches
Mail list logo