in reply to Is it possible to return two array by the same subroutine?

Use references.

sub foo { my @array1 = stuff(); my @array2 = flibberty(); return \@array1, \@array2; }

See perldoc perlref for more information.

Cheers,
Ovid

New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)