$lib->{'file'} should work
In reply to Re: foreach problem by zwon in thread foreach problem by dsula