Given : a filename as input, return a pair.
Returns: a pair
The first element of the pair is 0 or 1 (fail or success) The second element of the pair is the complete file named by the input argument.
Global Variables:
Notes:
Q I don't see a test to see if the file exists already.
A It's why there's the if.
sub ReadFile { my ($fileName) = @_; my ($data); local $/ = undef; # Read complete files
if (open(IN, "<$fileName")) { $data=<IN>; close IN; return (1, $data); } return (0, "");