D
dn.perl
I am feeling somewhat uneasy posting my query because quite likely it
is some other bug which is causing my code to fail and it is only a
matter of time before I discover it; but I have already spent far too
much time debugging it. So I might as well try to cover some
unsuspected source of bug.
The crux of my code is:
my @in_arr ;
foreach my $in(1 .. 10) {
my $in1 = "aabb" ;
my $in2 = "a string longer than 256 chars, say 275 chars" ;
my $in_str = "$in1 \t $in2 " ;
push @in_arr, $in_str ;
}
while (my $out_str = pop @in_arr) {
my ($out1, $out2) = split /\t/ , $out_str ;
print "out1 is $out1, out2 is $out2 \n" ;
}
The script hangs within the while loop. Could it happen if the value
of $out2 exceeds 256 characters at some point(s) during the code-run?
is some other bug which is causing my code to fail and it is only a
matter of time before I discover it; but I have already spent far too
much time debugging it. So I might as well try to cover some
unsuspected source of bug.
The crux of my code is:
my @in_arr ;
foreach my $in(1 .. 10) {
my $in1 = "aabb" ;
my $in2 = "a string longer than 256 chars, say 275 chars" ;
my $in_str = "$in1 \t $in2 " ;
push @in_arr, $in_str ;
}
while (my $out_str = pop @in_arr) {
my ($out1, $out2) = split /\t/ , $out_str ;
print "out1 is $out1, out2 is $out2 \n" ;
}
The script hangs within the while loop. Could it happen if the value
of $out2 exceeds 256 characters at some point(s) during the code-run?