sub new { my ($class, $fullpath, $date, $hostname) = @_; # Load log file in memory open(LOG_FILE, '<', $fullpath); @log_lines = ; close(LOG_FILE); # Define the object instance my $self = { log_lines => \@log_lines, fullpath => $fullpath, date => $date, hostname => $hostname }; bless($self, $class); return $self; }