#!/usr/bin/perl use strict; use warnings; use HTML::Parser; my $re_id = ''; my $html = qq~

No Obstacle

~; my $p = HTML::Parser->new(api_version => 3, start_h => [\&start_handler,"tagname,attr,self"])->parse($html); sub start_handler { my ($tag,$attr,$self) = @_; return unless $tag eq 'input'; return unless lc $attr->{type} eq 'hidden' && $attr->{name} eq 'REQUEST-ID'; $re_id = $attr->{value}; $self->eof; } print $re_id,"\n";