I am trying to search for a pattern in a file containing xml - When I match the search I want to retrieve all the text within the xml brackets..
Whats the best way to read in data between xml tags in a shell script?
ie..
xml returned which I have in a file now is something like below:... (2 Replies)
Hi,
I'm currently working on a perl website, and I would need a system where a few users can login into the administration side of the site. about 5-10 users maximum, all pretty simple.
I was thinking of using an .htaccess file and a seperate admin folder on the server. I'm wondering if there... (2 Replies)
I have a dropdown menu built in perl tk (I am using active state perl). I want to select a value from the dropdown menu and I want to be able to perform some other actions depending upon what value is selected. I have all the graphical part made but I dont know how to get the selected value. Any... (0 Replies)
Hi,
I am a JAVA programmer and I have no idea about perl. I did use it a long time ago and I don't even remember the basics. So here is my problem:
In my work, I am supposed to build a simple program that opens a website (Gene Ontology)and passes my query and returns the result into a file. The... (1 Reply)
Is there a way to see or print a sub code?
Sometime a sub could be already defined, but in the debug mode (so, interactively) it could be already out of screen.
So, I would think about a way to check if the sub is defined (just 'defined' is not a problem) and how it is defined.
Also, if... (4 Replies)
hello forum members,
I am siva ,As i am new to perl scripting i looking help from forum members.
i need a sample program are command for pattern matching.
I have file name infile1 which some data, I need to search the particular number are string in the file which repeats n number of... (0 Replies)
Hi Friends
i have a code below
sample $text contains the values
test1 PIC X
test1 PIC XX
test1 PIC XXX
test1 PIC X(8)
test1 PIC X(12)
test1 PIC X
test1 X(8)
test1 PIC X VALUE 'N'.
$text =~ /^\d{6} +(\d{2}) +(+) +PIC +(+)(\((\d+)\)(V(+)| +(COMP\-3).|\.)|( +(COMP\-3).|... (4 Replies)
awk/sed newbie here. I have a HTML file and from that file and I would like to retrieve a text word.
<font face=arial size=-1><li><a href=/value_for_clients/Tokyo/abc_process.txt>abc</a> NDK Version: 4.0 </li>
<font face=arial size=-1><li><a... (6 Replies)
I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command.
Eg:
Find the text UNIX in the below file and need to return Test 8 & Test 9
Test 1
Test 2
Test 3
Test 4
UNIX
Test 5
Test 6
Test 7
Test 8
Test 9
Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies
LEARN ABOUT DEBIAN
html::display
HTML::Display(3pm) User Contributed Perl Documentation HTML::Display(3pm)NAME
HTML::Display - display HTML locally in a browser
SYNOPSIS
use strict;
use HTML::Display;
# guess the best value from $ENV{PERL_HTML_DISPLAY_CLASS}
# or $ENV{PERL_HTML_DISPLAY_COMMAND}
# or the operating system, in that order
my $browser = HTML::Display->new();
warn "# Displaying HTML using " . ref $browser;
my $location = "http://www.google.com/";
$browser->display(html => $html, location => $location);
# Or, for a one-off job :
display("<html><body><h1>Hello world!</h1></body></html>");
DESCRIPTION
This module abstracts the task of displaying HTML to the user. The displaying is done by launching a browser and navigating it to either a
temporary file with the HTML stored in it, or, if possible, by pushing the HTML directly into the browser window.
The module tries to automagically select the "correct" browser, but if it dosen't find a good browser, you can modify the behaviour by
setting some environment variables :
PERL_HTML_DISPLAY_CLASS
If HTML::Display already provides a class for the browser you want to use, setting "PERL_HTML_DISPLAY_CLASS" to the name of the class will
make HTML::Display use that class instead of what it detects.
PERL_HTML_DISPLAY_COMMAND
If there is no specialized class yet, but your browser can be controlled via the command line, then setting "PERL_HTML_DISPLAY_COMMAND" to
the string to navigate to the URL will make HTML::Display use a "system()" call to the string. A %s in the value will be replaced with the
name of the temporary file containing the HTML to display.
%HTML::Display::os_default
The hash %HTML::Display::os_default contains pairs of class names for the different operating systems and routines that test whether this
script is currently running under it. If you you want to dynamically add a new class or replace a class (or the rule), modify %os_default :
# Install class for MagicOS
$HTML::Display::os_default{"HTML::Display::MagicOS"}
= sub { $^O =~ qr/magic/i };
__PACKAGE__->new %ARGS
$browser->display( %ARGS )
Will display the HTML. The following arguments are valid :
base => Base to which all relative links will be resolved
html => Scalar containing the HTML to be displayed
file => Scalar containing the name of the file to be displayed
This file will possibly be copied into a temporary file!
location (synonymous to base)
If only one argument is passed, then it is taken as if
html => $_[0]
was passed.
EXPORTS
The subroutine "display" is exported by default
COMMAND LINE USAGE
Display some HTML to the user :
perl -MHTML::Display -e "display '<html><body><h1>Hello world</body></html>'"
Display a web page to the user :
perl -MLWP::Simple -MHTML::Display -e "display get 'http://www.google.com'"
Display the same page with the images also working :
perl -MLWP::Simple -MHTML::Display -e "display html => get('http://www.google.com'),
location => 'http://www.google.com'"
AUTHOR
Copyright (c) 2004-2007 Max Maischein "<corion@cpan.org>"
LICENSE
This module is released under the same terms as Perl itself.
perl v5.10.1 2007-10-20 HTML::Display(3pm)