Q:\>perl -le "($x = 'foo') =~ /.(.)/g; print $1; $x = 'bar'; print $1" o a This is perl, v5.8.2 built for MSWin32-x86-multi-thread