in reply to octal error

You just need to quote it: $item = '05540986';  #do not change!Then Perl won't try to interpret it as a number, and the rest of your code will run just fine.

HTH