#!/usr/bin/perl use warnings; use strict; use Storable; my @array1 = ( 1..3 ); my @array2 = ( 4..6 ); my $store_file = './data.store'; # encapsulte the two arrays into a single array ref # for storage. We'll extract in print.pl store( [ \@array1, \@array2 ], $store_file ); # instead of passing the data as the parameters, pass the file name instead system( "./print.pl", $store_file );