# this file reads a text file and loads the contents into # an array sub loadFile($) { my $self = shift; my ($filename) = @_; open (FILE, "<$filename") or die("cannot open the file: $filename"); while () { $body .= $_; } close(FILE); return($body); }