in reply to positive integer identification (regular expression question)
then you want:
($ref =~ /^-[1-9]\d*$/) [download]