Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use strict;
- use warnings;
- use HTML::TokeParser;
- my $script = "/var/www/cgi-bin/findenergy";
- my $scriptoutput = `$script -debug particle=ALPHAS frequency=17.88 charge="+2"`;
- my $p = HTML::TokeParser->new(\$scriptoutput);
- my @energy = ();
- while (my $token = $p->get_tag("th")) {
- if($token->[1]{id}) {
- if($token->[1]{id} =~ /energy/){
- my $text = $p->get_trimmed_text("/a");
- @energy = split ' ', $text;
- print "$energy[2]\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement