I always use 1 while s///;, but you can also get that behavior with only using s///;:
my $data = "aaaaaaaaaaaaaaaaaaaaaaa"; # 23 a's
$data =~ s/aa/pos() = print a/ge;
print $data;
This outputs a in stead of aaaaaaaaaaaa
pos() normally returns the position where the regexpr matched the last time. Normally the s/// operator leaves of at that position. By using pos() as a lvalue you can reset this position. Therefore the s/// operator starts all over, mimmicking the 1 while s///g behavior.
I wouldn't use this under normal circumstantions though, since this is kind of a obfu. ;)