title: Pass command line arguments as well as input from STDIN for Perl script?
body: <p>I have a Perl script which takes both command line arguments and STDIN</p>
  
  <pre><code>#!/usr/bin/perl -w
  use strict;
  use warnings;
  
  my $logpath = $ARGV[0];
  print "logpath : $logpath\n";
  
  print "Name : ";
  my $name = &lt;&gt;;
  chomp($name);
  print "my name is $name\n";
  </code></pre>
  
  <p>It does not stop at stdin input. 
  Works fine for any one of command line or standard input but not for both.</p>
  
  <p>Any Reason?</p>