glob question



hi
i have a piece of perl code like this

....
print "$globbed\n" ; # this output gives *.txt
process($globbed);

....

sub process {
my $pattern = $_[0];
while ( glob $pattern ) {
....

}

}
when the sub process is executed, i have an error
" glob failed (child exited with status 1) "

thanks very much for any help rendered :-)

.