in reply to Re^4: Parsing the data returned from the companies house API
in thread Parsing the data returned from the companies house API

Which can be shortened and made less repetitive like this:
use feature qw{ say }; if (is_hashref($decodedJSON) && exists $decodedJSON->{items}) { for my $item (@{ $decodedJSON->{items} }) { say $item->{name} if exists $item->{name}; if (exists $item->{address} && is_hashref($item->{address})) { for my $key ( qw( address_line_1 address_line_2 locality region post +al_code ) ) { say $item->{address}{$key} if exists $item->{address}{ +$key}; } } } }

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]