#!/usr/bin/perl -l $_="123"; @a=/./g; print "#1: ", /./g; $_="123"; $a=/./g; print "#2: ", /./g; $_="123"; /./g; print "#3: ", /./g; $_="123"; /./g; print "#4: ", /\G./g; $_="123"; /./g; undef pos; print "#5: ", /./g; $_="123"; /./g; undef pos; print "#6: ", /\G./g; $_="123"; /./g; pos = 2; print "#7: ", /./g; $_="123"; /./g; pos = 2; print "#8: ", /\G./g; #### #1: 123 #2: 23 #3: 23 #4: 23 #5: 123 #6: 123 #7: 3 #8: 3