perl -e 'package a; use base qw(Tie::Handle);
sub TIEHANDLE { bless \ +shift } sub WRITE {
$_[1] =~ /.............................(.)..
....(.)(.)...........(.)/x && print "$4$3$2$
1\n" } package main; tie *STDERR, a; $a =$0;
$a->print(bless {}, "main")=~/Bareword found
where operator expected at -e line 1/smxgo;'
I get the same error with perl v5.8.0 built for i386-freebsd
Also, the quoting is all wrong for the Windows shell, so it won't run there either. It should run (with the same error as above) in a Windows port of bash.
I get:
Modification of a read-only value attempted at - line 2.
I'm guessing that's not what was expected? That was with perl 5.8.0 on Unix, BTW.
Well, you guessed right {grin}. I'm using 5.8.3 from a Debian package, and don't have any guesses off the top of my head as to which piece is causing the error.
Sorry it didn't work for you (and the other PMer who responded whom it didn't work for). I guess relying on specific warnings for a japh probably isn't the most portable way to make it happen {grin}.