Help for this page

Select Code to Download


  1. or download this
    while( my $line = <FILE> . <FILE> ) {
        chomp $line; # gets rid of the trailing \n 
    ...
    
        # do what you need to with these
    }
    
  2. or download this
    while( ( $line1 = <FILE> ) && ( $line2 = <FILE> ) ) {
        chomp $line1;
    ...
        my ( $date, $message, $type ) = ( $1, $2, $line2 );
        # continue on...
    }