title: In Perl, what is the difference between s/^\s+// and s/\s+$//?
body: <p>I know that the following three lines of codes aim to extract the string into $value and store it in $header. But I do not know what are the differences between <code>$value =~ s/^\s+//;</code> and <code>$value =~ s/\s+$//;</code>.</p>
  
  <pre><code>$value =~ s/^\s+//;
  $value =~ s/\s+$//;
  $header[$i]= $value;
  </code></pre>