in reply to passing an array and some scalars to a subroutne

As bellaire pointed out, you load the first 4 args in both cases, I'm guessing what you meant was:
. my ($id_snp, $id_assay, $session, $load_set) = splice @_, 0, 4; #thes +e variables my @lines = @_; #this array . .
Update: Mis-spelt bellaires monika

A user level that continues to overstate my experience :-))