mclow has asked for the wisdom of the Perl Monks concerning the following question:
sub new { my ($class, $fullpath, $date, $hostname) = @_; # Load log file in memory open(LOG_FILE, '<', $fullpath); @log_lines = <LOG_FILE>; close(LOG_FILE); # Define the object instance my $self = { log_lines => \@log_lines, fullpath => $fullpath, date => $date, hostname => $hostname }; bless($self, $class); return $self; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Blessing object changes array attribute in array of arrays?
by Corion (Patriarch) on Jul 06, 2005 at 12:56 UTC | |
by mclow (Initiate) on Jul 06, 2005 at 14:07 UTC | |
by Corion (Patriarch) on Jul 06, 2005 at 14:13 UTC | |
|
Re: Blessing object changes array attribute in array of arrays?
by rev_1318 (Chaplain) on Jul 06, 2005 at 14:23 UTC | |
by mclow (Initiate) on Jul 06, 2005 at 14:56 UTC | |
by dave_the_m (Monsignor) on Jul 06, 2005 at 15:01 UTC | |
by Tanktalus (Canon) on Jul 06, 2005 at 15:58 UTC |