compare two array

Hi firnds,

I am having two arrays
eg. @a=qw(1 2 3 4) and @b=qw(1 3 6 9)
Now, I want to compare two arrays on first index of both arrays and if they matched, it should output remaining indexes
Pseudo-code
if ($a[0] == $b[0])
{ print "remaining indexes";}

How can i do this using perl?

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.