local $/=undef;
open FILE, "myfile" or die "Couldn't open file: $!";
$string =
close FILE;
perl -MCPAN -eshell
Zkouška: perl -e'print "Modul dostupny\n";' -MGD::3DBarGrapher
sudo vi /usr/lib/perl5/site_perl/5.8.8/GD/3DBarGrapher.pm
perltidy -gvu program.pl perltidy -html program.pl
http://perldoc.perl.org/perlreftut.html
use Data::Printer;
print p($_);
If you're on Linux, use the strace utilitiy to tell you what your script is doing while it hangs. Either run
strace -f perl mycode.pl input_file.txt > output.txt
or start your script normally, wait till it hangs, find out the PID of the script process and execute
strace -f -p
strace prints to STDERR, so you'll see the strace output normally in your terminal while STDOUT still gets written to the output file. It will tell you what the process is doing on a system call level. To find out where it hangs at the perl level you could execute it in the debugger and step through until it hangs.
perl -d mycode.pl input_file.txt > output.txt
s/[^\r\n\t\x20-\x7E\xA0-\xFF]//
http://dbi.perl.org/
https://metacpan.org/pod/DBI
You have utf8-encoded characters where Perl is expecting to see bytes. You probably need to encode() your data before it gets to this point.