title: What does !~ mean in perl
body: <p>Can someone explain to me what does this line mean?</p>
  
  <pre><code>elsif ($ARGV[0] !~ /^\d+$/
  </code></pre>
  
  <p>The complete code is below, it was meant to echo the input.</p>
  
  <pre><code>if (@ARGV != 2) {
      print "Usage: ./echon.pl &lt;number of lines&gt; &lt;string&gt;\n";
      exit;
  } elsif ($ARGV[0] !~ /^\d+$/) {
      print "./echon.pl: argument 1 must be a non-negative integer\n";
      exit;
  }
  
  $i=0;
  while ($i &lt; $ARGV[0]) {#print argv[1] for argv[0] - 1 times
      print "$ARGV[1]\n";
      $i++;
  }
  </code></pre>