标签云

微信群

扫码加入我们

WeChat QR Code

sub foo {[$#{$_[!$||$|]}*@{$_[!!$_^!$_]}?@{$_[!$..!!$.]}[$_[@--@+]%@{$_[$==~/(?=)//!$`]}..$#{$_[$??!!$?:!$?]},($)?!$):!!$))..$_[$--$-]%@{$_[$]/$]]}-(!!$++!$+)]:@{$_[!!$^^^!$^^]}]}update: I thought the word "puzzle" would imply this, but: I know what it does - I wrote it.If the puzzle doesn't interest you, please don't waste any time on it.


Which language? Perl? PHP?

2019年03月23日07分35秒

I suspect the point is "just for fun". Not sure if it's in the spirit of stackoverflow though, is it? If I'm looking for answers to genuine programming problems, I don't want to have to wade through obfu puzzles..

2019年03月24日07分35秒

Stuff like this is going to make SO less than useful?I thought this was supposed to be a site where we could find useful questions and answers.

2019年03月23日07分35秒

I think YAPHs, Obfus and Golf should be restricted to the Monastery and avoided among people :-). A fellow monk.

2019年03月23日07分35秒

not my idea of "fun" even a little, but I think it's an OK question for stack overflow if tagged puzzle and fun..

2019年03月23日07分35秒

The if( $len_1 ) part is wrong; the raw code is checking two different conditions.

2019年03月23日07分35秒

Err, and so the else clause isn't correct.And the $arr_1->[] syntax is not equivalent to the {}[].

2019年03月23日07分35秒

Fixed the afore mentioned errors.

2019年03月23日07分35秒

Thanks.Testing with print {foo($_,[qw/y s t h/])},"\n" for -4..4; gives identical output to the original now.

2019年03月24日07分35秒

Actually I never tested any of it.

2019年03月24日07分35秒

What happens when the first parameter is not an arrayref?

2019年03月24日07分35秒

also, the > 0 there isn't correct.

2019年03月24日07分35秒