# pass in values, and return value from subroutine $value = read_write_file("filename1.txt","filename2.txt"); # call subroutine print $value; ################################## ######## subroutines ################### ################################## sub read_write_file { # take in 2 variables, inputfilename, and outputfilename my($inputfile, $outputfile) = @_; # pass in 2 variables print $inputfile," ",$outputfile,"\n"; $returnvalue = "job well done"; }