Perl numerals is a way to represent natural numbers in Perl wihtout the use of numeric literals, examples: 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.
Name:
Anonymous2016-12-02 21:33
syntax error at -e line 1, near "say !"
Name:
Anonymous2016-12-02 21:52
>>2 you need use 5.010; at least to use say(), otherwise just print and add a new line character.