Perl 5, 70 bytes
A subroutine:
{$"='';reverse(map/[A-Z]/?chr(155-ord):$_,(@_=split'',uc$_[0]))eq"@_"}
See it in use:
print sub{...}->("W i z a r d")
msh210
- 3.5k
- 23
- 36
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeA subroutine:
{$"='';reverse(map/[A-Z]/?chr(155-ord):$_,(@_=split'',uc$_[0]))eq"@_"}
See it in use:
print sub{...}->("W i z a r d")