#!/usr/bin/perl #First start the daemon in the background ./daemon.pl& #Then run this file ./xpt5a.pl use strict; use warnings; my $i = 0; my $j = 0; my @array1 = ""; my @array2 = ""; my $cmd = ""; my $result = ""; system("free -m"); #Using system() print '#Before array setup - using system("date");: '; system("date"); printf "\n\$?=0x%x \$!=%s\n", $?, $!; #Setup big arrays for ($i = 1; $i <= 5760; $i++) { for ($j = 1; $j <= 2880; $j++) { $array1[$i][$j] = "<1234567890,1234567890,1234567890>"; $array2[$i][$j] = "<1234567890,1234567890,1234567890>"; } } print "#Finished setup of two arrays $i x $j\n"; #Using daemon.pl - creating the ready file is the signal to the daemon open (READY, '>ready'); close (READY); #Wait for the daemon's reply - the daemon deletes ready when it has finished while ( -e "ready" ) {sleep 2;} print "\n#End\n"; exit;