- or download this
sub hole{(pop=~/\w+/g)[4]} # 16
- or download this
Can't find label TPC at -e line 5.
- or download this
perl -e"die qq{Can't find label TPC at -e line 5.\n}" # 53
...
perl -e'#line 5' -e'goto TPC' # 29
perl -e'#line 5' -egoto+TPC # 27
- or download this
perl -e"
goto TPC"
- or download this
input output
'aaaaaa' 'a'
'ababab' 'ab'
'aabaab' 'aab'
'ababaa' ''
- or download this
sub hole{pop=~/^(.+?)\1+$/;$1} #20
- or download this
5065726c206861636b6572
->
('P', 'e', 'r', 'l', ' ', 'h', 'a', 'c', 'k', 'e', 'r')
- or download this
sub hole{grep$_=$_&&chr hex,split/(..)/,pop} # 34
...
sub hole{(pack'H*',@_)=~/./g} # 19
sub hole{$_=pack'H*',@_;/./g} # 19
- or download this
sub hole{$m=pop;$m=($m,$_)[$m<$_]for@_;$m} # 32
sub hole{$m=pop;$_>$m&&($m=$_)for@_;$m} # 29
sub hole{$m=pop;$_>$m?$m=$_:1for@_;$m} # 28
- or download this
e.g.: hole('dog', 'cat', 'fish', 'duck', 'lemur')
returns: ('cat', 'lemur', 'fish', 'dog', 'duck')
- or download this
sub hole{map{$_->[0]}sort{$a->[1]cmp$b->[1]}map{[$_,m/[aeiou]/g]}@_}
+ # 58
...
sub hole{map{substr$_,1}sort map{/[aeiou]/;$&.$_}@_} # 42
sub hole{map/.(.+)/,sort map/[aeiou]/&&$&.$_,@_} # 38