malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "\x{feff}[{"registered...") #### use strict; use warnings; use JSON; use Data::Dumper; $/ = undef; open my $fh, '<', 'charity.json'; my $data = <$fh>; close $fh; print unpack("W", substr($data, 0, 1)) . ' - ' . unpack("W", substr($data, 1, 2)) . ' - ' . unpack("W", substr($data, 2, 3)) . "\n\n"; $data =~ s/.*?\[/\[/; # <-- fudge to clear character(s) my $json = decode_json $data; print Dumper $json; Using this JSON file as a test... [{"registered":true,"insolvent":false,"administration":true,"test":false}] #### $VAR1 = [ { 'administration' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ), 'registered' => $VAR1->[0]{'administration'}, 'test' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ), 'insolvent' => $VAR1->[0]{'test'} } ]; #### foreach my $key(keys %{@{$json}[0]}) { print "$key - "; print ${@{$json}[0]}{$key}; print "\n"; }