rlogin in PERL

Hi,

What I would like to do is use "rlogin" to access a remote server and grep a file for some information?

So, In PERL, I have the following Hash defined.

%box = ('box1' => 'rem1', 'box2' => 'rem2');
%log  = ('box1' =>  '/abc1/def1/xyz1', 'box2' =>  '/abc2/def2/xyz2');

Within my foreach loop, I have this statement

rlogin $box -l myuserid

Questions

1) I get the error "Can't call method "rlogin" on an undefined value" in the
above line

2) Where and How can I specify the password? Is it part of the rlogin?
How do I automate this?

Please provide the complete syntax

Note :- I did try the hostname command on the command prompt and It
asks for a password and I am able to get in on the remote m/c

Thanks
nurani