Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Best way to handle interactive user input?

by Ppeoc (Beadle)
on Nov 26, 2015 at 08:30 UTC ( [id://1148649]=note: print w/replies, xml ) Need Help??


in reply to Re: Best way to handle interactive user input?
in thread Best way to handle interactive user input?

My XML parser code
my $twig = XML::Twig->new( twig_handlers => { 'Mughals' => sub { + my ($twig, $el) = @_; + $twig->purge; + }, 'Mughals//*' => sub { + my $a = $_->tag; + if ($a eq "Book") + { + print $fout1 "\n"; + print $fout2 "\n"; + } #print $fout1 $_->tag, ", ", $_->text, unless ($_->has_ +children('#ELT')); print $fout2 $_->tag, ",", unless ($_->has_children('#E +LT')); print $fout1 $_->text, ",", unless ($_->has_children('# +ELT')); } } ); $twig->parsefile('book.xml');
This is a part of the code for parsing one part of the file 'Mughals'. The path to Mughals is History->Indian History -> Mughals. I am confused about how to accept this input from the user.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1148649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found