in reply to while (<FH>) always ends with "Couldnt read from remote file: End of file at"

I Am using :
use common::sense; # Supposed to be mostly the same, with much lower memory usage, as: # use utf8; # use strict qw(vars subs); # use feature qw(say state switch); # use feature qw(unicode_strings unicode_eval current_sub fc evalby +tes); # no feature qw(array_base); # no warnings; # use warnings qw(FATAL closed threads internal debugging pack # portable prototype inplace io pipe unpack malloc # glob digit printf layer reserved taint closure # semicolon); # no warnings qw(exec newline unopened); use Net::SFTP::Foreign; use Getopt::Std; use Config::General; use Fcntl qw(O_RDONLY :mode); use boolean ':all'; use Data::Dumper;
  • Comment on Re: while (<FH>) always ends with "Couldnt read from remote file: End of file at"
  • Download Code

Replies are listed 'Best First'.
Re^2: while (<FH>) always ends with "Couldnt read from remote file: End of file at"
by Anonymous Monk on Jul 06, 2017 at 12:22 UTC
    use common::sense; Ick!

    While it does many good things, I avoid this module for a couple of reasons:

    1. no strict 'refs'; is an uncommon sensibility. Use it only in those few blocks where it has value.
    2. use utf8; is entirely reasonable in a web app; but, in a command line environment, it completely ignores your terminal's settings and decodes your command line as utf8, no matter how inappropriate.
    TJD

      I agree on no strict 'refs';, but am not sure what "use utf8; ... decodes your command line as utf8" is supposed to mean (also considering this isn't a oneliner). Are you maybe thinking of use open qw/:std :utf8/; or perl -C instead? (see utf8 vs. open vs. -C)