As far as I can tell this question was cross-posted to StackExchange*, where the source of this problem was cited as HackerEarth. Cross-posting is considered acceptable as long as you inform readers, so that efforts are not duplicated.
Update: * The link above has now gone dead. The one posted in a reply below is currently still good: http://stackoverflow.com/questions/42733000/code-golf-in-perl
In reply to Re: Golf code in perl
by haukex
in thread Golf code in perl
by tt08
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |