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

limzz has asked for the wisdom of the Perl Monks concerning the following question:

Please help, I've spent over an hour trying to figure out how to take everything before the first forward slash in a string. It's consuming my sanity and I don't think I or my monitor will survive much longer.

(my $stuff) = ($thing =~ /^(\S+)\/*?/)

I've tried every variation on that line I can think of and none of them worked. Someone please save me before I lose my mind.