$_ = 'in scalar context' x 3; print $_,$/; while(/in scalar context/g){ print $a++,$/; }