Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Warning, Will Robinson

by dug (Chaplain)
on Sep 13, 2004 at 19:18 UTC ( #390645=obfuscated: print w/replies, xml ) Need Help??

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;'

Replies are listed 'Best First'.
Re: Warning, Will Robinson
by muntfish (Chaplain) on Sep 14, 2004 at 10:33 UTC

    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.


    s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&

      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}.

      -- Douglas Hunter

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://390645]
Approved by dfaure
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2023-03-24 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (61 votes). Check out past polls.

    Notices?