in reply to I cannot execute a url request through Dancer

G'day logangha,

In this code:

my (@arrRes, @arrNoRes) = processRequest(params->{reference});

Everything returned by processRequest() will go to @arrRes; while @arrNoRes will remain empty.

From here, things will start to go wrong: for instance, the condition "@arrNoRes > 0" will always be false; and so on from there.

I suggest you rewrite processRequest() to return two arrayrefs, instead of two arrays. Then make other changes from there as appropriate; e.g. "@$arrNoRes > 0".

— Ken