Thanks, but I'm still unclear as to why this is happening. Since the $progref variable shares the same scrope with the sub, I don't understand why the sub can't see it. I've read the relevant section of perlsub, and as far as I can tell this should work.