Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gabor (1626)

  (email not shown publicly)

Perl developer and trainer []
Test automation using Perl []

Journal of gabor (1626)

Saturday February 07, 2004
04:32 AM

smatch in your face

[ #17263 ]
What will this snippet print ?

$s = "apple";
$rep = "banana";
while ($s =~ s/a/$rep/) {}
print $s;




Yes, this is nice infinate loop that was biting me for some 3 days. It was hidden somewhere in my code and was somewhat more complicated and I had good reasons to think that the problem is somewhere else but hey this is such a stupid bug.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.