someone wrote:
Thanks a lot ! I can see you are really exceptional among these Perl monks:)
Thank you for the complement, but I still have a lot to learn in a
number of areas. It's a multifaceted game, and we're all at different
stages. The people on the Perl Beginners list help me, so I try to help
others. You know things that other people don't, so you can help too.
We can all learn together. :-)
Actually I once tried to get a Perl module in CPAN, but in the end found a
useful one in Python library, which makes me rethink what considered by so many
Perl advocates as biggest strength :ie CPAN.
CPAN is a mixed bag... I'm in the process of writing wrapper modules
for the CPAN modules I use most often. Basically, building an
application-specific language with a consistent interface, so that I can
solve more complex problems without struggling to keep multiple
interfaces straight:
Carp
Data::Dumper
Digest
Log::Log4perl
Math::Random::ISAAC
Scalar::Util
It's probably a good idea to improve my programming skills first.
Get a good book, write code, and learn as you go.
There's nothing as satisfying as finding a new idea in a book and then
using it to write some code you need. For example, I just figured out
the following code using my Prng module (wraps Math::Random::ISAAC using
the iterator idea from HOP) and a functional programming style
(suggestions for improvement are welcome; I see one already):
use Dpchrist::Prng qw( make_prng );
my $size = 1024;
my $type = "byte";
my @seeds = ( 0 .. 3 );
my %buf = do {
map { $_ => do {
my $prng = make_prng($type, $_);
my $buf;
my $n = $size * 2**$_;
$buf .= $prng->() while $n--;
$buf
}
} @seeds
};
This fills %buf with 1 KB, 2 KB, 4 KB, and 8 KB blocks of repeatable
pseudo-random binary data indexed by seed value (0, 1, 2, and 3). I'm
going to use those blocks to test my Digest wrapper (also an iterator).
As one person I know said, "design from the top down; build from the
bottom up" [Rob Wallace].
David
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/