Hi, welcome to the monastery!
I took a look at your post and I have some thoughts about both the post and the code.
First, regarding your post. The following things about it make it difficult to help you:
For tips on how to get better help, please see:
With regard to your code, while there are lots of things about it that could be improved, both it and the following Short, Self-Contained, Correct Example "work" and produce the same essential output.
Output:use strict; use warnings; use Encode::Guess; my $encodings_test = 'ascii cp1252 cp437 cp850 iso-8859-1 utf-8-strict + utf8'; guess_encoding('some text', qw/$encodings_test/);
Unknown encoding: $encodings_test at /Users/1nickt/perl5/perlbrew/perl +s/perl-5.30.1/lib/5.30.1/darwin-2level/Encode/Guess.pm line 120.
An even simpler SSCCE :
Output:use strict; use warnings; use Test::More tests => 2; my $str = 'foo bar baz'; my @arr = ('foo', 'bar', 'baz'); is_deeply( [ qw/foo bar baz/ ], [ @arr ] ); is_deeply( [ qw/$str/ ], [ @arr ] );
See qw.11115052-3.pl .. 1..2 ok 1 not ok 2 # Failed test at 11115052-3.pl line 8. # Structures begin differing at: # $got->[0] = '$str' # $expected->[0] = 'foo' # Looks like you failed 1 test of 2. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Test Summary Report ------------------- 11115052-3.pl (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 Files=1, Tests=2, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.05 cusr + 0.00 csys = 0.07 CPU) Result: FAIL
A couple of other observations I had:
Hope this helps!
In reply to Re: issue with Encode::Guess
by 1nickt
in thread issue with Encode::Guess
by toohoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |