in reply to Re: Re: Yet another JAPH
in thread Yet another JAPH

Right, Perl (5.8.0 on Linux) doesn't like the script trying to modify $$. Anyway, what does it output? (I tried setting a temp variable at the top to $$ and used that variable instead of $$ (so there's no more error), but it didn't do anything.)

Replies are listed 'Best First'.
Re: Re: Re: Re: Yet another JAPH
by Mr. Muskrat (Canon) on Mar 23, 2003 at 19:10 UTC

    You need to replace all instances of @$ too. Something like:

    #!/usr/bin/perl $_='0b1d35022f290d59436b612b034f531747493d676d130507651125713b1f7f';@_ +=qw/0B 25 00002 00011 02/;while($_ =~ /^(..)((?:..)+)$/){push @~,hex( +$1);$_=$2;}@~=sort {$a <=> $b} (@~,hex $_);map{$~^=$~;$~++;map{$~*=$~ +[hex $_];}(split('',$_));print chr $~;}@_;

    Note: I did not check if $~ is a read-only variable in 5.8. This was more of an example of what all needs to be changed. YMMV.