Name: Anonymous 2016-12-02 21:10
Perl numerals is a way to represent natural numbers in Perl wihtout the use of numeric literals, examples:
Your task is to write a function that given a natural number returns a valid Perl numeral expression that evaluates into that same number.
say !''>>!''; # 0
say !''; # 1
say !''<<!''; # 2
say !''<<!''|!''; # 3
say !''<<!''<<!''; # 4
say !''<<!''<<!''|!''; # 5
Your task is to write a function that given a natural number returns a valid Perl numeral expression that evaluates into that same number.