Exactly, how does this work? The following code prints 2 2 and not 1 6.
use warnings; use strict; my $input = 'rnbqkbnr'; $input =~ /(n)/g; print "@+\n";
In reply to Re^2: How can one create an array of the indices at which a given character appears in a string?
by hdb
in thread How can one create an array of the indices at which a given character appears in a string?
by tkguifan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |