I have just used the code you have given in a sample perl file,while compiling it is throwing some error,I'm unable to figure out them.can you please help me fixing these errors:
Code:
#!perl
use Oraperl;
use DBI;
use DBD::Oracle qw(:ora_types);
use Time::Local;
use vars qw($opt_f);
&Getopts('f:');
if (!defined( $opt_f ))
{
print "Test.pl - Missing filename.\n ";
exit -1;
}
print "\n $opt_f ";
awk -F= '/(accumId="450")/ {
unit=$4; gsub(/(\"|inclUnitsUsed)/,"",unit);
used=$5; gsub(/(\"|shared)/,"",used);
shrd=$6; gsub(/(\"|pooled)/,"",shrd);
printf "%s %s %s\n", unit, used, shrd";
} ' $opt_f ;
print "\n $unit .";
print "\n $used .";
print "\n $shrd .";
While compiling it I'm getting these errors:
Code:
Test.pl outexg2.xml
Scalar found where operator expected at ./Test.pl line 21, near "} ' $opt_f"
(Might be a runaway multi-line '' string starting on line 16)
(Missing operator before $opt_f?)
syntax error at ./Test.pl line 21, near "} ' $opt_f "
Execution of ./Test.pl aborted due to compilation errors.
I have a PERL script from which I need to make a HTTP request to Web Servlet (Essentially a URL with variables and values like &Variable1=AAAAAA&Variable2=BBBBBBBBB&Variable3=CCCCCCC). The Web servlet returns an XML result which needs to be parsed for the contents of the result within the program.... (15 Replies)
******************PERL VERSION************************
This is perl, v5.8.1 built for i386-linux-thread-multi
ERROR!!!!---Undefined subroutine &main::start called at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser/Expat.pm line 469.
*********************PERL... (1 Reply)
Well I have read several threads on the subject ... but being a newbie like me makes it hard to understand ...
What I need is the following:
Input data:
------- snip ---------
<FavouriteLocations> <FavouriteLocations class="FavouriteList"><Item... (6 Replies)
I have a bash script that needs to read input from an XML file, which includes varying numbers of a certain type of child node. I want to be able to iterate through all the child nodes of a given parent. I installed the Perl XML-XPath package from
search.cpan.org. Once it's installed, from bash,... (4 Replies)
Hello!
We need to parse weblogic config.xml file and display rows in format:
machine:listen-port:name:application_name
In our enviroment the output should be (one line for every instance):
Crm-Test-Web:8001:PIA:peoplesoft
Crm-Test-Web:8011:PIA:peoplesoft... (9 Replies)
for some reasons, i need to parse the XML result by using perl.
for instance, this is a sample XML result:
<Response>
<status>success</status>
<answer>AAA::AAA</answer>
<answer>BBB::BBB</answer>
</Response>
then i can use this way :
my @output = ();
foreach my $parts (@all) ##@all... (2 Replies)
I am trying to parse the XML Google contact file using tools like xmllint and I even dived into the XSL Style Sheets using xsltproc but I get nowhere.
I can not supply any sample file as it contains private data but you can download your own contacts using this script:
#!/bin/sh
# imports... (9 Replies)
Hi,
Need help with parsing xml data in unix and place it in a csv file. My xml file looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<iwgroups>
<nextid value="128">
</nextid>
<iwgroup name="RXapproval" id="124" display-name="RXapproval"... (11 Replies)
Discussion started by: ajayakunuri
11 Replies
LEARN ABOUT DEBIAN
test::unit::runner::terminal
Test::Unit::Runner::Terminal(3pm) User Contributed Perl Documentation Test::Unit::Runner::Terminal(3pm)NAME
Test::Unit::Runner::Terminal - unit testing framework helper class
SYNOPSIS
use Test::Unit::Runner::Terminal;
my $testrunner = Test::Unit::Runner::Terminal->new();
$testrunner->start($my_test_class);
DESCRIPTION
This class is a test runner for the command line style use of the testing framework.
It is similar to its parent class, Test::Unit::TestRunner, but it uses terminal escape sequences to continually update a more informative
status report as the runner progresses through the tests than just a string of dots, E's and F's. The status report indicates the number
of tests run, the number of failures and errors encountered, which test is currently being run, and where it lives in the suite hierarchy.
The class needs one argument, which is the name of the class encapsulating the tests to be run.
OPTIONS -wait
wait for user confirmation between tests
-v version info
AUTHOR
Copyright (c) 2000-2002, 2005 the PerlUnit Development Team (see Test::Unit or the AUTHORS file included in this distribution).
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
o Test::Unit::TestCase
o Test::Unit::Listener
o Test::Unit::TestSuite
o Test::Unit::Result
o Test::Unit::TkTestRunner
o For further examples, take a look at the framework self test collection (t::tlib::AllTests).
perl v5.8.8 2006-09-13 Test::Unit::Runner::Terminal(3pm)