Today marks 27 years since the "birthday" of one of the most popular programming languages today - Perl. It has created a myriad of applications and Internet resources, including those having multimillion-dollar audiences, and the corresponding financial turnovers. You won't have to go far for examples: Amazon, Yahoo !, Slashdot. The last 20 years, he is among the ten most used languages, despite rumors of his demise. However, the multimillion army of Perl programmers, annually issuing a multitude of products to the surface, convincingly refutes the camelinus innuendoes. As the saying goes, the dog barks - the caravan is coming. Since its introduction in 1987, Perl has nurtured two generations of programmers, and there is no reason to abandon the Pearl Ship of the Desert for at least 30 more years. So we are pleased to congratulate all Perl programmers on their birthday of their “native” language, Larry Wall wish calendar and creative longevity so that he has enough enthusiasm to create a couple more versions of Perl.
#!/usr/bin/perl -lap $_=0;while(--$^T){@F=sort{$a=reverse$a;rand>0.5?1:-1}@F;$_=$&if"@F"=~/(\d)((\d) \3)*\1/&&length$&>length} $><<(gets+$/+$_.reverse).split.permutation.map{|b|b*' '=~/(?!.*(.)(.) .*\2\1)(.)((.) \5)*\3/&&$&||?0}.max_by(&:size) #!/usr/bin/perl -pl sub c{$_=pop;s/\d\d/c("@_ $&",$'.$`)/eg;$_=pop;$m=$1 if!/(\d)(\d).*\2\1/&/^ ((.)((.) \4)*\2)$/}c$_.reverse;$_=$m//0 #!/usr/bin/ruby -apF $_='0';$F.permutation{|o|a=d='';o.map{|i|i[d]&&a+=d+i.sub(d,'')+' ';a[0][d=a[-2]]&&a>$_&&$_=a.chop}} Source: https://habr.com/ru/post/246117/
All Articles