title: How to take substring of a given string until the first appearance of specified character?
body: <p>The question is for perl.</p>
  
  <p>For example if I have <code>"hello.world"</code> and the specified character is <code>'.'</code> then the result I want is <code>"hello"</code>.</p>