Hrrm, I'm not sure why the check of $res and @$res both; @$res by itself would work.