title: Use of uninitialized value in substitution (s///) error in Perl
body: <p>I'm not used to Perl but had to create this function.</p>
  <pre><code>sub getPrice {
     my $url = shift;
     my $prdid = shift;
     my $count = shift;
     my $totcount = shift;
  
     print &quot;($count/$totcount) Fetching Product Price : $prdid .&quot;;    
     my $rs = sendRequest('GET', $url);
     print &quot;url :&quot;.$url;
     print &quot;..\n&quot;;
  
     $rs =~ s!.*Unit Price Excl. VAT!!s;
     $rs =~ s!&lt;/table&gt;.*!!s;
  
     $rs =~ m!([0-9,]+) +EUR!;
     $rs = $1;
     $rs =~ s/,/./;
  
     return $rs;
  }
  </code></pre>
  <p>When I call this function I get this error.</p>
  <pre><code>Use of uninitialized value in substitution (s///)
  </code></pre>
  <p>The error points out the <code>$rs =~ s/,/./;</code> line.</p>
  <p>Is there any error in the way I'm replacing it??</p>
  <p>The $url value is valid.</p>