It took me a long time to see the cause of this, (but it was processing 1 GB of data), and I thought it might prove interesting/amusing to others.
Greatly simplified from the original that was processing data from a file, this program never terminates. Can you see why?
#! perl -slw use strict; my @bits = unpack '(a3)*', 'abcdefghijklmnopqrstuvwxyz'; 1 while "@bits[3,5,7]" =~ m[vwx]g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Program enters infinite loop, can you see why?
by ikegami (Patriarch) on Dec 07, 2010 at 03:58 UTC | |
by raybies (Chaplain) on Dec 07, 2010 at 13:33 UTC | |
|
Re: Program enters infinite loop, can you see why?
by JavaFan (Canon) on Dec 07, 2010 at 10:09 UTC | |
|
Re: Program enters infinite loop, can you see why?
by Anonymous Monk on Dec 07, 2010 at 03:56 UTC | |
by BrowserUk (Patriarch) on Dec 07, 2010 at 04:11 UTC | |
by Anonymous Monk on Dec 07, 2010 at 04:21 UTC | |
by ikegami (Patriarch) on Dec 07, 2010 at 04:11 UTC | |
|
Re: Program enters infinite loop, can you see why?
by pajout (Curate) on Dec 07, 2010 at 10:14 UTC |