thanks to all,

i was able to solve the problem with your guidance. The code below worked
for me:

print OUTPUTSCRIPT "print qq|\\n|; ";

Now I want to calculate the response time that web server took for a
particular request(GET/POST). My output script is something like the
following:

my $req20 = HTTP::Request->new(POST => "
http://192.168.1.170^M/vodexUi/CVodSchedularViewMgr.php ");
$req20->content_type('application/x-www-form-urlencoded');
$req20->content('strPageOp=buildQuery&strUnicastVusArr%5B%5D=regular&strUnicastUrl=rtsp%3A%2F%2F&strUnicastUrlArr%5B%5D=rtsprCPDurationSeconds=&strCPRunName=test&strCPSavedRunsArr=test');
# Pass request to user agent & get response
my $resp20 = $browser->request($req20);
print qq|Response code is: |;print $resp20->code;
print qq|\n|;

I am using LWP::UserAgent, HTTP::Request and HTTP::Response here. How can I
calculate the response time on the basis of above data.

As always, your help appreciated,

Mihir
On 11/4/06, Ron Smith <[EMAIL PROTECTED]> wrote:

--- Mazhar <[EMAIL PROTECTED]> wrote:

> On 11/4/06, Mihir Kamdar <[EMAIL PROTECTED]>
> wrote:
> >
> > hi,
> >
> > I am a beginner in Perl. I am trying to
> automatically generate a perl test
> > case file which, on executing, would return HTTP
> response code and
> > response
> > time,etc. In the output file that I am getting I
> want the following line:
> >
> > print "\n" ;
> >
> > Any Suggestions??
> >
Would the following help?

perl -e 'print "\\n\n"'

Escape the backslash. This prints "\n" on a new line.


Ron Smith
[EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Reply via email to