http://www.perlmonks.org?node_id=1030492


in reply to split giving me a splitting headache

Could also try and use a combination of rindex and substr, which may be more efficient.
If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P