If you had begun with the standard boilerplate, then you would know:
#!/usr/bin/env perl
#
# name_of_program - what the program does as brief one-liner
#
# Your Name <your_email@your_host.TLA>
# Date program written/released
#################################################################
use 5.10.0;
use utf8;
use strict;
use autodie;
use warnings FATAL => "all";
# ⚠ change to agree with your input: ↓
use open ":std" => IN => ":encoding(ISO-8859-1)",
OUT => ":utf8";
# ⚠ change for your output: ↑ — *maybe*, but leaving as UTF-8 is sometimes better
END {close STDOUT}
our $VERSION = 1.0;
$| = 1;
The answer is that your program is syntactically but not semantically correct. You are printing "something"
to the unopened Dumper
filehandle-object, because Dumper
is in the dative slot for the print
method call. That makes Dumper
print
’s invocant. But you never opened a handle by that name, so you are printing to an uninitialized filehandle.
Use my boilerplate. PLEASE!