#!/usr/bin/perl my ( $dim, $diff ); print "Enter the dimension of the matrix: "; $dim = <>; chomp($dim); print "You are going to multiply $dim by $dim matrices!\n" ; `rm -f ~/I ~/R ~/IR ~/RI`; `./mkRandomMatrix ~/R $dim`; print `ls -lh ~/R`; `./mkIdentityMatrix ~/I $dim`; print `ls -lh ~/I`; `./mkZeroMatrix ~/IR $dim`; print `ls -lh ~/IR`; `./mkZeroMatrix ~/RI $dim`; print `ls -lh ~/RI`; print `./spmm.1 ~/I ~/R ~/IR $dim`; print `./spmm.1 ~/R ~/I ~/RI $dim`; $diff = `diff ~/IR ~/RI`; if($diff){ print "~/IR and ~/RI differ\n"; } else { print "~/IR and ~/RI agree\n"; }