in reply to DBI - selectcol_arrayref not working

selectcol_arrayref can return undef for a variety of reasons, so you shouldn't blindly dereference its return value.

You should probably pay attention to failures (by checking $DBI::errstr, for instance). I also suggest you turn the RaiseError attribute on when connecting.

A workaround might be to wrap your line in an eval. That'd allow you to continue your business, while also logging why it failed:

my $welcome = eval { pop @{ $dbh->selectcol_arrayref($query) }; }; warn $@ if $@;