Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: More tasty XML goodness

by mirod (Canon)
on Sep 16, 2000 at 00:41 UTC ( #32744=note: print w/replies, xml ) Need Help??


in reply to More tasty XML goodness

And of course you can also use XML::Twig to get the same result:

#!/bin/perl -w use strict; use XML::Twig; my $posts= 0; my $rep=0; my $twig= new XML::Twig( TwigRoots => { NODE => sub { my( $t, $node)= @_; $posts++; $rep +=$_[1]->att( 'reputation'); $t->purge; } }); $twig->parsefile( $ARGV[0]); print "$posts posts, $rep rep, ", sprintf( "%5.2f", $rep/$posts), " a +verage\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://32744]
help
Chatterbox?
[ambrus]: MLX: if it's a work email, then it's probably not Uncle Sam that matters, but what the account managing server at work thinks your name is. Those can differ. For example, we've had two co-workers with identical real name at one point,
[ambrus]: so one got a stupid suffix in the email account (people have email address based on their real name here usually).

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-01-19 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.