title: What is a good way to read in text?
body: <p>In my sms-script I read in the text to send with this subroutine:</p>
  
  <pre><code>my $input = input( "Enter the input: " );
  
  sub input {
      my $arg = shift;
      print $arg if $arg;
      print "\n ";
      chomp( my $in = &lt;&gt; );
      return $in;
  }
  </code></pre>
  
  <p>This way I can correct errors only through canceling all until I reach the error and this only in the last line. 
  Is there a better way to read in my text?</p>