comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Will Perl 6 be usable as a procedure language?         


Author: Lars Eighner
Date: Apr 30, 2008 22:12

Will perl 6 be usable as a procedure language?

--
Lars Eighner <http://larseighner.com/> usenet@larseighner.com
Countdown: 264 days to go.
66 Comments
  Frequency in large datasets         


Author: Cosmic Cruizer
Date: Apr 30, 2008 19:15

I've been able to reduce my dataset by 75%%, but it still leaves me with a
file of 47 gigs. I'm trying to find the frequency of each line using:

open(TEMP, "< $tempfile") || die "cannot open file $tempfile:
$!";
foreach () {
$seen{$_}++;
}
close(TEMP) || die "cannot close file
$tempfile: $!";

My program keeps aborting after a few minutes because the computer runs out
of memory. I have four gigs of ram and the total paging files is 10 megs,
but Perl does not appear to be using it.

How can I find the frequency of each line using such a large dataset? I
tried to have two output files where I kept moving the databack and forth
each time I grabbed the next line from TEMP instead of using $seen{$_}++,
but I did not have much success.
19 Comments
  FAQ 3.10 Is there an IDE or Windows Perl Editor?         


Author: PerlFAQ Server
Date: Apr 30, 2008 18:03

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

3.10: Is there an IDE or Windows Perl Editor?

Perl programs are just plain text, so any editor will do.

If you're on Unix, you already have an IDE--Unix itself. The UNIX
philosophy is the philosophy of several small tools that each do one
thing and do it well. It's like a carpenter's toolbox.

If you want an IDE, check the following (in alphabetical order, not
order of preference):

Eclipse
http://e-p-i-c.sf.net/

The Eclipse Perl Integration Project integrates Perl
editing/debugging with Eclipse.

Enginsite
http://www.enginsite.com/
Show full article (7.71Kb)
no comments
  File Help Please         


Author: Andy
Date: Apr 30, 2008 14:15

Hiya Guys

Well I am new, and still trying to learn perl...while at work on 10
different things....sheesh is there ever enough time to learn
something..

Needless to say

I need to accomplish the following.
Data Below
Show full article (0.86Kb)
2 Comments
  FAQ 3.15 How can I make my Perl program run faster?         


Author: PerlFAQ Server
Date: Apr 30, 2008 12:03

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

3.15: How can I make my Perl program run faster?

The best way to do this is to come up with a better algorithm. This can
often make a dramatic difference. Jon Bentley's book *Programming
Pearls* (that's not a misspelling!) has some good tips on optimization,
too. Advice on benchmarking boils down to: benchmark and profile to make
sure you're optimizing the right part, look for better algorithms
instead of microtuning your code, and when all else fails consider just
buying faster hardware. You will probably want to read the answer to the
earlier question "How do I profile my Perl programs?" if you haven't
done so already.
Show full article (2.68Kb)
no comments
  FAQ 3.6 How do I profile my Perl programs?         


Author: PerlFAQ Server
Date: Apr 30, 2008 06:03

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

3.6: How do I profile my Perl programs?

You should get the Devel::DProf module from the standard distribution
(or separately on CPAN) and also use Benchmark.pm from the standard
distribution. The Benchmark module lets you time specific portions of
your code, while Devel::DProf gives detailed breakdowns of where your
code spends its time.

Here's a sample use of Benchmark:

use Benchmark;

@junk = `cat /etc/motd`;
$count = 10_000;
Show full article (2.28Kb)
no comments
  Devel::SmallProf claims "return 1" needs much time !?         


Author: whumann
Date: Apr 30, 2008 05:51

I'm trying to do some profiling on DBM::Deep. I started with
Devel::DProf and Devel::Profile but for some subs I had no idea *why*
they took long, so I tried Devel::SmallProf for additional detail.
Much of what I see makes sense but results like this puzzle me (these
are the subs that do the low-level disc read and write):

count wall tm cpu time line
0 0.00000 0.00000 103:sub print_at {
314000 0.96161 3.67000 104: my $self = shift;
314000 0.88398 3.34000 105: my $loc = shift;
...
Show full article (2.50Kb)
9 Comments
  What's wrong with transparency by GD?         


Author: Ela
Date: Apr 30, 2008 01:05

After testing different parameters, I'm still unable to obtain 2 transparent
circles. Could anybody tell me what's wrong in the following codes?

#!/usr/bin/perl
use GD;

$im = new GD::Image(550,450);
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);
$red = $im->colorAllocateAlpha(255,0,0,119);
$blue = $im->colorAllocateAlpha(0,0,255,119);
$im->transparent($white);
$im->alphaBlending(1);
$im->setStyle($black);

$im->filledArc(460,380,95,75,0,360,$red);
$im->filledArc(500,380,95,75,0,360,$blue);

open(IMG, ">test.png");
binmode IMG;
print IMG $im->png;
close IMG;
3 Comments
  FAQ 3.9 Is there a ctags for Perl?         


Author: PerlFAQ Server
Date: Apr 30, 2008 00:03

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

3.9: Is there a ctags for Perl?

(contributed by brian d foy)

Ctags uses an index to quickly find things in source code, and many
popular editors support ctags for several different languages, including
Perl.

Exuberent ctags supports Perl: http://ctags.sourceforge.net/

You might also try pltags: http://www.mscha.com/pltags.zip

--------------------------------------------------------------------
Show full article (1.33Kb)
no comments
  Python's doc problems: sort         


Author: xahlee
Date: Apr 29, 2008 19:48

Of my Python and Perl tutorial at http://xahlee.org/perl-python/index.html

the most popular page is

“Sorting in Python and Perlâ€
http://xahlee.org/perl-python/sort_list.html

For example, in last week, that page is fetched 550 times.
The second most popular page, trails quite a distance. Here's the top
3 pages and their number of times fetched:

550 http://xahlee.org/perl-python/sort_list.html
341 http://xahlee.org/perl-python/system_calls.html
222 http://xahlee.org/perl-python/index.html

Note that the first 2 pages are far more popular than the entry page
the table of contents.

Apparently, and also verified by my web log, that people have
difficulty in using sort, and they find my pages thru web search
engines.

------------------

In 2005, i wrote over ten essays detailing Python's documentation
problems. One of them is titled:
Show full article (10.44Kb)
8 Comments
 
1 2 3 4 5 6 7 8 9