I get it on my windows 2k machine with ActiveState perl 5.8.3
I don't get it on my linux machines. All of them have the same kernel and Perl build:
andromeda:davidj tmp > cat test.pl
#!/usr/bin/perl
#
use strict;
use warnings;
my $string = "abc";
while( $string =~ /b/g ) {
print $#-, "\n";
}
andromeda:davidj tmp > ./test.pl
0
andromeda:davidj tmp > uname -a
Linux andromeda 2.6.11-gentoo-r5 #3 Sun Apr 24 03:22:46 MDT 2005 i686
+Intel(R) Pentium(R) M processor 1.60GHz GenuineIntel GNU/Linuxandrome
+da:davidj tmp > perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
Platform:
osname=linux, osvers=2.6.9-gentoo-r1, archname=i686-linux
uname='linux livecd 2.6.9-gentoo-r1 #1 smp thu nov 25 03:43:53 utc
+ 2004 i686 intel(r) pentium(r) m processor 1.60ghz genuineintel gnuli
+nux '
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|