Although, if $t may contain non-word characters, that becomes:sub t_in_s { ($t=pop)=~s/./$&.*/g;$_[0]=~$t } t_in_s('abcdefghijklmnopqrstuvwxyz', 'for');
sub t_in_s { ($t=pop)=~s/./\Q$&\E.*/g;$_[0]=~$t }
In reply to Re: Golf: Embedded In Order
by chipmunk
in thread Golf: Embedded In Order
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |