Ignore:
Timestamp:
2002-04-24T13:45:59+12:00 (22 years ago)
Author:
jrm21
Message:

Added check for reading an empty file (ie read_line() returns undef).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/multiread.pm

    r1870 r3095  
    230230    # special case for the first line of utf8 text to detect whether
    231231    # the file is in utf8 or unicode
    232     $$text .= $self->read_line ();
     232   
     233    # possible to have no text here...
     234    my $read_text = $self->read_line ();
     235    $$text .= $read_text if (defined($read_text));
    233236    }
    234237
Note: See TracChangeset for help on using the changeset viewer.