Thanks to ikegami (the "/" separator is not always the case with $^X):($\={})=~s/(?<=.).+//&&print+(q/J/,\//=~ /..(\S)/&&$1.$2.($^X=~/.+\/(.)/&&uc($1)))
($\={})=~s/(?<=.).+//&&print+(q/J/,\//=~ /..(\S)/&&$1.$2.($^X=~/\W(.)\w+\.?\w*?$/&&uc($1)))
In reply to ref and JAPH by setebos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |