Help for this page

Select Code to Download


  1. or download this
    2011-04-28 13:25:47 INFO [main:114] <Message><Tag attribute="value">An
    +swer</Tag></Message>
    2011-04-28 13:45:12 DEBUG [Populate::List:31] <Message><Tag attribute=
    +"value">Answer</Tag></Message>
    
  2. or download this
    while (<$fh>) {
        chomp;
        my ($date, $time, $log_lvl, $trace, $xml) = split ' ', $_, 5;
    }
    
  3. or download this
    my $twig = XML::Twig->new();
    while (<$fh>) {
    ...
        $twig->parse($xml);
        # Build up %data_structure using $twig
    }
    
  4. or download this
    while (<$fh>) {
        chomp;
    ...
    sub handle_message {
        # ...
    }