U
usenet
Kindly consider, if you will, the following code which illustrates my
question about List::MoreUtils (which reminds me, I haven't seen
Tassilo around here recently)...
#!/usr/bin/perl
use strict; use warnings;
use List::MoreUtils qw{ each_arrayref };
my $ea = each_arrayref ([1..26],["A".."Z"]);
while ( my ($a, $b) = $ea->() ) { #[this is line 6]
print "$a\t$b\n";
}
__END__
Which is a convoluted way to do this (but I expect the same result):
perl -e 'printf ("%s\t%s\n", $_, chr($_ + 64)) for (1..26)'
But instead, I get an error (twice):
semi-panic: attempt to dup freed string at ./junk line 6.
That message makes absolutely no sense to me (and it's not explained in
the docs), and I can't see what's wrong with my code (other than the
fact that its a convoluted approach).
If only I knew what I was doing wrong then the color would return to
the trees and the flowers would regain their fragrance. As it is, I'm
consigned to a gray world of despair.
question about List::MoreUtils (which reminds me, I haven't seen
Tassilo around here recently)...
#!/usr/bin/perl
use strict; use warnings;
use List::MoreUtils qw{ each_arrayref };
my $ea = each_arrayref ([1..26],["A".."Z"]);
while ( my ($a, $b) = $ea->() ) { #[this is line 6]
print "$a\t$b\n";
}
__END__
Which is a convoluted way to do this (but I expect the same result):
perl -e 'printf ("%s\t%s\n", $_, chr($_ + 64)) for (1..26)'
But instead, I get an error (twice):
semi-panic: attempt to dup freed string at ./junk line 6.
That message makes absolutely no sense to me (and it's not explained in
the docs), and I can't see what's wrong with my code (other than the
fact that its a convoluted approach).
If only I knew what I was doing wrong then the color would return to
the trees and the flowers would regain their fragrance. As it is, I'm
consigned to a gray world of despair.