[19124] in Perl-Users-Digest
Perl-Users Digest, Issue: 1319 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 17 18:16:02 2001
Date: Tue, 17 Jul 2001 15:15:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <995408122-v10-i1319@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 17 Jul 2001 Volume: 10 Number: 1319
Today's topics:
Re: Premature End of Script Headers <tward10@jaguar.com>
Re: Premature End of Script Headers <joe.lindquist@usa.alcatel.com>
Re: Premature End of Script Headers <joe.lindquist@usa.alcatel.com>
Re: Premature End of Script Headers <godzilla@stomp.stomp.tokyo>
Re: Question about indenting in emacs cperl-mode <gnarinn@hotmail.com>
Re: read the 9th column <pne-news-20010717@newton.digitalspace.net>
Reblessing part of object data structure in another pac <someone@microsoft.com>
Re: Recommendations for a 2nd book on Perl (blackpike)
Replacing a specific line <confused@times.doh>
Re: Replacing a specific line <krahnj@acm.org>
Re: Replacing a specific line <godzilla@stomp.stomp.tokyo>
Re: Replacing a specific line (mc)
Re: sortlen -- filter to sort text by line length <ren@tivoli.com>
Ternary Conditional Operator Question (Jonathan Cunningham)
Re: Urgent Help Req. Plz (Randal L. Schwartz)
writing user agent (Nipa)
Re: writing user agent (Rene Nyffenegger)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 17 Jul 2001 15:56:05 +0100
From: "Trevor Ward" <tward10@jaguar.com>
Subject: Re: Premature End of Script Headers
Message-Id: <9j1jm7$8lg8@eccws12.dearborn.ford.com>
Without more of the code to look at it is very difficult to see exactly what
you are doing.
However a common error which I make is to have something else on the line
like a space after the EOHTML.
If this doesn't work try posting your code so we can look at it.
"Joe Lindquist" <joe.lindquist@usa.alcatel.com> wrote in message
news:9j1hhb$e74$1@auds955.usa.alcatel.com...
> I am running into this error repeatedly in executing several cgi scripts.
I
> have referenced apache, and active state's FAQs, which have helped
somewhat.
> My cgis still occasionally still yield this error after I rearrange the
> outputted HTML. I am using:
>
> print <<EOHTML;
> ...
> EOHTML
Check the L above is the last character and there are no spaces or tabs etc.
(just end of line).
> and have tried embedding the http header inside of this, as well as
outside.
> This has fixed a few of my scripts, however it has been useless on others.
> I have also attempted to use the $| special variable to buffer /
non-buffer
> the output to no avail. Also, the script compiles and executes fine at
the
> command prompt. I am running Apache 1.3.2, and ActiveState's ActivePerl 5
>
> Thanks,
>
> Joe Lindquist
>
>
------------------------------
Date: Tue, 17 Jul 2001 10:37:13 -0500
From: "Joe Lindquist" <joe.lindquist@usa.alcatel.com>
Subject: Re: Premature End of Script Headers
Message-Id: <9j1m39$fue$1@auds955.usa.alcatel.com>
Thanks for the help, Here is the subroutine which outputs the HTML:
sub generate_HTML()
{
local ($oldbar) = $|;
$cfh = select (STDOUT);
$| = 1;
print <<EOHEAD;
Content-type: text/html
<html>
<head>
<title>ARIS Support Knowledge Base Logical Search Engine</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Joe Lindquist">
</head>
<body bgcolor="#FFFFFF">
<form name="description" action="solution.pl" method="post">
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center"
height="400">
<tr>
<td height="50" colspan="2" align="center" bgcolor="#CCCCCC">
<img src="../kblogo.gif" width="400" height="50"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" colspan="2" height="20"> </td>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" width="200" height="330"><b> Area<br> Type
<br> Detail<br> Choose a Description
</b></td>
<td valign="top" width="400" height="330">
<b>$area</b><br>
<b>$type</b><br>
<b>$detail</b><br>
<input type="hidden" name="area" value="$area">
<input type="hidden" name="type" value="$type">
<input type="hidden" name="detail" value="$detail">
<select name="description">
EOHEAD
########## Populate List Box ###########
while (@row=$sth->fetchrow_array){
print " <option value=\"@row\">@row</option>\n";
}
############ Print HTML Footer ###########
print <<EOFOOT;
</select>
<input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>
EOFOOT
$| = $oldbar;
select ($cfh);
}
...This is going to wreak havoc on my spell checker...
Thanks again.
------------------------------
Date: Tue, 17 Jul 2001 11:09:43 -0500
From: "Joe Lindquist" <joe.lindquist@usa.alcatel.com>
Subject: Re: Premature End of Script Headers
Message-Id: <9j1o08$iqv$1@auds955.usa.alcatel.com>
I've massaged the code a little bit, and now its working. The only thing I
changed was that I moved the http header to its own print statement. all of
its brethren scripts work fine with it inside the print statement. Any
ideas of why this would cause the problem?
Trevor Ward <tward10@jaguar.com> wrote in message
news:9j1jm7$8lg8@eccws12.dearborn.ford.com...
> Without more of the code to look at it is very difficult to see exactly
what
> you are doing.
>
> However a common error which I make is to have something else on the line
> like a space after the EOHTML.
>
> If this doesn't work try posting your code so we can look at it.
>
> "Joe Lindquist" <joe.lindquist@usa.alcatel.com> wrote in message
> news:9j1hhb$e74$1@auds955.usa.alcatel.com...
> > I am running into this error repeatedly in executing several cgi
scripts.
> I
> > have referenced apache, and active state's FAQs, which have helped
> somewhat.
> > My cgis still occasionally still yield this error after I rearrange the
> > outputted HTML. I am using:
> >
> > print <<EOHTML;
> > ...
> > EOHTML
> Check the L above is the last character and there are no spaces or tabs
etc.
> (just end of line).
>
>
> > and have tried embedding the http header inside of this, as well as
> outside.
> > This has fixed a few of my scripts, however it has been useless on
others.
> > I have also attempted to use the $| special variable to buffer /
> non-buffer
> > the output to no avail. Also, the script compiles and executes fine at
> the
> > command prompt. I am running Apache 1.3.2, and ActiveState's ActivePerl
5
> >
> > Thanks,
> >
> > Joe Lindquist
> >
> >
>
>
------------------------------
Date: Tue, 17 Jul 2001 10:08:39 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Premature End of Script Headers
Message-Id: <3B547117.400259DF@stomp.stomp.tokyo>
Joe Lindquist wrote:
(snipped)
> My cgis still occasionally still yield this error after I rearrange the
> outputted HTML.
This is untrue. An error of this topic type is not random in nature.
Headers are either correct or incorrect; no randomness involved.
> This has fixed a few of my scripts, however it has been useless on others.
Any answer provided will only be a guess. You have failed
to provide clear and concise parameters. Post a sample of
a format which does not work. Without a clear code sample,
you are asking for guesses.
I am curious why you are not using a format which does work
correctly, for all of your scripts.
Godzilla!
------------------------------
Date: Tue, 17 Jul 2001 19:14:55 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Question about indenting in emacs cperl-mode
Message-Id: <995397295.394459440372884.gnarinn@hotmail.com>
In article <9iv8vp$9ie@insanity.ksu.ksu.edu>,
Don Eisele <eisele@ksu.edu> wrote:
>I am having a problem in which some code inside blocks
>aren't getting indented in the same way as some
>code outside of blocks.
>
>following is a sample of the type of code I am having problems
>with (I want it to look like the second one):
>#1
>{
> print "dog",
> "cat",
> "frog",
> "nee";
>}
funny. I get
#1
{
print "dog",
"cat",
"frog",
"nee";
}
a) talk to CPerl's author
b) autoindenting will never be perfect
c) even if it was, i would not agree :-)
d) who cares?
gnari
------------------------------
Date: Tue, 17 Jul 2001 22:32:49 +0200
From: Philip Newton <pne-news-20010717@newton.digitalspace.net>
Subject: Re: read the 9th column
Message-Id: <ob79lt8bku4p6gtnheato7122emq2fe7bq@4ax.com>
On 17 Jul 2001 10:13:43 GMT, rgarciasuarez@free.fr (Rafael
Garcia-Suarez) wrote:
> Alexvalara wrote in comp.lang.perl.misc:
> } Hi all
> } i am using ls and after that i am trying to read the 9th column of the line (is
> } coming from ls!)
> } ($file)
>
> Perl one-liner solution :
> ls -l | perl -lpe '$_=(split)[8]'
Shorter:
ls -l | perl -lape '$_=$F[8]'
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 17 Jul 2001 18:27:08 GMT
From: "Chetan Patil" <someone@microsoft.com>
Subject: Reblessing part of object data structure in another package
Message-Id: <0s%47.221640$%i7.125067248@news1.rdc1.sfba.home.com>
Hi,
I have a complex data strucuture which I have blessed in a package.
my ($selfA) = bless {
foo => {...},
goo => [ ...],
}, $classA;
$selfA{poo} = new classB (config => $selfA);
Now in classB package,
my ($selfB) = $Vars{config}->{foo};
# i.e. I create a refr to a sub-strucure in $selfA data structure
$selfB->{config} = $Vars{config}; # And I create a refr loop by pointing to
$selfA
bless $selfB, $classB;
Then I can go and access $selfA{poo} as an object. I can get to both the
objects from either one.
Is this a good approach? What are the pitfalls against this approach?
Specifically, can I rebless part of data strucuture in another package? I
think I can legally, but I am not sure if it is a good programming approach.
I don't want to maintain two copies of {foo} data.
I would like to avoid the reference loop as well, but I want to be able to
get to the config (i.e. $selfA) data from within $selfB methods as well.
I hope my question is clear. Please let me know if more details are needed.
Thanks,
Chetan
------------------------------
Date: 17 Jul 2001 09:26:06 -0700
From: blackpike@my-deja.com (blackpike)
Subject: Re: Recommendations for a 2nd book on Perl
Message-Id: <45a3895e.0107170826.def53eb@posting.google.com>
tommyumuc@aol.com (JR) wrote in message news:<319333f5.0107120647.42e8c42e@posting.google.com>...
> I would appreciate any suggestions anyone may have for a second book
> on Perl. The first book through which I have gone is "Sams-Teach
> Yourself Perl in 24 Hours" (how ridiculous is that?). I use the
> "Programming Perl" and "CGI/Perl Cookbook" as reference books, but I
> really need a good second "how-to" book on Perl. I have used Perl to
> create an intranet database for a recent office project, but this
> database only contained 317 relatively small records. The next
> database that I am required to create will contain over 30,000 records
> (small records again). The second Perl book for which I am asking
> suggestions should cover well hashes, databases (especially) and CGI
> (I won't be able to use DBI, because the intranet database must be put
> on an intranet production server and I've read many times that DBI
> shouldn't be used for production--so that may be out, but I have
> confidence somebody out there has a good idea how to handle large
> intranet databases without DBI).
>
> Thank you very much!
>
> Joe
Hi Joe,
I'm new to perl as well and I'd recommend the perl cookbook, as a
second book rather than the programming perl book. The PP book is a
bit dry without many examples and covers stuff which is way advanced.
It was like this.
I read through Learning perl and did the examples.
I bought and read the Programming perl and it didn't do much for me.
I bought and read the Perl Cookbook and I just started throwing code
quickly
together. Sometimes just lifting the code straight out the book.
I installed Mysql and bought MySQL & mSQL I don't rate this book much
not enough examples and to much referance stuff.
I bought and read Progamming the perl DBI. loads of examples
I've been putting together a search engine and with these books I've
already managed to write a webrobot that goes over our intranet,
extracting links
and feedings them into the Mysql. I've also put together a rough CGI
program that lists the links out on a webpage.
I've also bought CGI Programming with Perl & Mastering Algorithms with
perl but havent got round to reading them yet.
The perl DBI accessing Mysql seams to work ok, I haven't had any
problems with it other than bugs in my code. So far my database has
2758 rows in 1 table.
but note that Mysql doesn't to transactions.
hope this helps.
------------------------------
Date: Tue, 17 Jul 2001 19:21:08 GMT
From: Confused @ Times <confused@times.doh>
Subject: Replacing a specific line
Message-Id: <MPG.15be3e53b6c302c6989680@news.telusplanet.net>
Hi folks, I'm rather new to Perl, so forgive me idiocy I'm if missing
the obvious.
I want to replace a specific line in a text file with the current date,
however I first need to make sure the file contains the number of lines
I need (in this case 25).
If it's has less than 25 lines I need to write enough blank lines at the
end of the file and then write the current date on line 25.
If it has more than 25, I need to make sure I don't truncate the file.
Also, I need to make sure that the existing data in the file is
retained, so I'm loading the entire file into an array. I'm writing each
line back, as read (unless it's line 25) to a new file, but for some
reason only lines that start with numbers are being written.
Can a fresh pair of eyes take a look at my code and see what I'm doing
wrong? Thanks in advance.
------------------------
sub WriteLastLogin {
# Open the existing user file and read it into an array
fopen(FILE, "< $memberdir/$username.dat");
@memsettings=<FILE>;
fclose(FILE);
# Count the number of lines in the file
$count = 0;
foreach (@memsettings) {
$_ =~ s~[\n\r]~~g;
$count++;
}
# If there are fewer lines in the profile than the line number for
storing the
# last login, set the number of to be written to the profile to the same
number
# as the line number for the last login (does that make sense?) =)
if ($count < 25) { $count = 25}
# Open the file for writing
# TODO: change filename from temp.dat to actual username file
fopen(FILE, "+> $memberdir/temp.dat");
# Loop thru each line as long as it is not the last line
for ($i = 1; $i <= $count; $i++) {
# If the line being written is NOT the line for storing the last login
date,
# write the value originally read in
if ($i != 25) {
# If the line in the array isn't blank, then write the array value
# otherwise, write a blank line
# using ($i-1) to compensate for the array starting at zero.
if ($memsettings[($i-1)] != '') {
print FILE "$memsettings[($i-1)]\n";
} else {
print FILE "\n";
}
# If the line being written IS the line for storing the last login date,
# write the current date/time
} else {
print FILE "$date\n";
}
}
fclose(FILE)
}
------------------------------
Date: Tue, 17 Jul 2001 20:34:39 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Replacing a specific line
Message-Id: <3B54A15B.16D79EF2@acm.org>
"Confused @ Times" wrote:
>
> Hi folks, I'm rather new to Perl, so forgive me idiocy I'm if missing
> the obvious.
>
> I want to replace a specific line in a text file with the current date,
> however I first need to make sure the file contains the number of lines
> I need (in this case 25).
>
> If it's has less than 25 lines I need to write enough blank lines at the
> end of the file and then write the current date on line 25.
>
> If it has more than 25, I need to make sure I don't truncate the file.
>
> Also, I need to make sure that the existing data in the file is
> retained, so I'm loading the entire file into an array. I'm writing each
> line back, as read (unless it's line 25) to a new file, but for some
> reason only lines that start with numbers are being written.
>
> Can a fresh pair of eyes take a look at my code and see what I'm doing
> wrong? Thanks in advance.
>
> [snip code]
sub WriteLastLogin {
open FILE, "< $memberdir/$username.dat"
or die "Cannot read from $memberdir/$username.dat: $!";
chomp( my @memsettings = <FILE> );
close FILE;
if ( @memsettings >= 25 ) {
for ( @memsettings ) {
if ( $_ eq 'text to replace' ) {
$_ = $date;
# since you don't specify your criteria for replacement
# I can't write anything more specific then this.
}
}
}
else {
$memsettings[24] = $date;
}
open FILE, "> $memberdir/temp.dat"
or die "Cannot write to $memberdir/temp.dat: $!";
print FILE "$_\n" for @memsettings;
close FILE;
}
John
--
use Perl;
program
fulfillment
------------------------------
Date: Tue, 17 Jul 2001 14:09:19 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Replacing a specific line
Message-Id: <3B54A97F.9E65671C@stomp.stomp.tokyo>
Confused @ Times wrote:
(significant snippage)
> Hi folks, I'm rather new to Perl, so forgive me idiocy I'm if missing
> the obvious.
> fopen(FILE, "< $memberdir/$username.dat");
> fclose(FILE)
Your code contains three fatal syntax errors. Your use
of fopen / fclose is intended for POSIX, PerlIO, ANSI C,
early Hewlett-Packard systems, VMS and a few other obscure
circumstances. Use open () and close () for standard
Perl usage.
You are missing a semicolon after fclose(FILE).
Your code writes to line 24, not line 25 as indicated,
after fatal syntax errors are corrected.
> ...only lines that start with numbers are being written.
No clear and concise parameters are provided. You indicate
a problem with your data input but fail to provide any
sample of your data input.
Any answers provided for your questions are wild guesses
or, answers provided by you under a fake name.
Consider posting code which does not contain fatal
syntax errors, posting a data sample and rewording
your article so it is readily understandable.
Godzilla!
--
CONTENTS OF test1.txt:
______________________
line one
line two
line three
line four
line five
PRINTED TO test2.txt:
_____________________
(23 blank lines)
Second Else In Effect
TEST SCRIPT:
____________
#!perl
open(FILE, "< test1.txt");
@memsettings=<FILE>;
close(FILE);
$count = 0;
foreach (@memsettings)
{
$_ =~ s~[\n\r]~~g;
$count++;
}
if ($count < 25)
{ $count = 25}
open(FILE, "+> test2.txt");
for ($i = 1; $i <= $count; $i++)
{
if ($i != 25)
{
if ($memsettings[($i-1)] != '')
{ print FILE "$memsettings[($i-1)]\n"; }
else { print FILE "\n"; }
}
else
{ print FILE "Second Else In Effect\n"; }
}
close(FILE);
exit;
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
------------------------------
Date: Tue, 17 Jul 2001 21:26:57 GMT
From: nospam@home.com (mc)
Subject: Re: Replacing a specific line
Message-Id: <3b54ace7.364814287@news>
> if ($memsettings[($i-1)] != '') {
> print FILE "$memsettings[($i-1)]\n";
> } else {
> print FILE "\n";
> }
>
Is this your actual code? You're missing a closing double quote in
the first line above but I'd think this wouldn't get past the
compiler.
mc
------------------------------
Date: 17 Jul 2001 10:05:51 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: sortlen -- filter to sort text by line length
Message-Id: <m3elrfsii8.fsf@dhcp9-161.support.tivoli.com>
On Tue, 17 Jul 2001, goldbb2@earthlink.net wrote:
> Ren Maddox wrote:
>>
>> On Fri, 13 Jul 2001, gbacon@HiWAAY.net wrote:
>>
>> [snipped sorting by length with ST or GRT]
>>
>> > A scalar already knows its length, so all the time and space used
>> > in constructing, accessing, and stripping the augmented list is
>> > wasted.
>>
>> Ack! I thought that perhaps the GRT advantage of the built-in
>> comparison would overcome this, but some quick benchmarking has not
>> revealed that to be true.
>
> The basic sort (using the custom sort routine, doing a numeric
> comparison on lengths) only compares a small, fixed, number of bytes
> (depending on the size of a double), whereas the grt sort has to
> compare (at least) 4 bytes, plus it continues on to look at the
> string contents if the lengths are equal. So if you grt sort
> 100_000 strings all of length 50, it will do many many 54-byte
> comparisons. If you do the basic/custom sort, it will do many many
> 8-byte comparisons (assuming doubles are 8 bytes).
>
> If strings are especially long, and many strings are all the same
> length, you may get a significant benefit by adding a "stabilizer":
>
> my $stabilizer = 0;
> print map { substr $_, 8 } sort map {
> pack 'NNa*', length, $stabilizer++, $_ } <>;
OK, that makes sense. But it didn't pan out in my benchmarks. Adding
the stabilizer actually slowed the GRT down, and by an increasing
margin as the size of the data set increased. This was for strings of
random length less than 10 consisting solely of "a"-s.
As a further test, I tried this version that throws away the original
data:
map { substr $_, 4 } sort map { pack 'N', length } <>;
While it is faster than the original version (unlike the stable GRT),
it is still appreciably slower than the basic length sort.
The moral I'm taking from this is that the cost of a custom comparison
is enough to make a difference between ST and GRT, but it is still
dwarfed by the startup costs of both. Only when the actual comparison
routine itself is complex is there a benefit.
... Or perhaps length based sorting is somehow optimized in current
versions of Perl??
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 17 Jul 2001 13:55:28 -0700
From: dawfun@seanet.com (Jonathan Cunningham)
Subject: Ternary Conditional Operator Question
Message-Id: <4d6fd5fc.0107171255.97784f7@posting.google.com>
Ok folks.
I'm usually pretty good at figuring this stuff out, but this one is
really kicking my @$$.
I'm trying to see if $slash =~ m{/} is a match, and then I want to do
a substitution on $_ depending on the outcome of the match. I've
tried a million ways to parenthesize, but no luck.
Could someone out there please let me know why this doesn't work:
# @_ == ('d:/some/path');
# $slash == '';
for(@_) {
$slash =~ m{/} ? s{\\}{/}g : s{/}{\\}g;
# This doesn't work either...
# ($slash =~ m{/}) ? s{\\}{/}g : s{/}{\\}g;
}
I'm hoping this is going to be a "duh" moment for me.
Thanks,
Jonathan
------------------------------
Date: 17 Jul 2001 09:51:42 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Urgent Help Req. Plz
Message-Id: <m1n163h529.fsf@halfdome.holdit.com>
>>>>> "Umair" == Umair Tariq Bajwa <ub98aa@brocku.ca> writes:
Please learn to choose your subject wisely. Your urgent help
is anyone else's routine FAQ.
Umair> I am writing a script so users can change their passwords in password
Umair> file using web GUI. In my post section i am executing command like that
Umair> ...............
Umair> system "htpasswd -m filename newuser";
Umair> What should I do after that so I can enter user's specified new
Umair> password? I just want to simply update the file. Any idea? Any idea will
Umair> be greatly appreciated. Thanks in advance.
$ perl -MCPAN -e 'install "HTTPD::UserAdmin"'
$ perldoc HTTPD::UserAdmin
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 17 Jul 2001 09:15:38 -0700
From: npatel@webley.com (Nipa)
Subject: writing user agent
Message-Id: <24d1a4c3.0107170815.70b19fd3@posting.google.com>
Hi,
I am not sure which newsgroup this question would belong to ,but since
it is related to use of cgi/perl i am posting it here.
I have a question about write a samll user agent in my cgi/perl
script.
This for a test scenario and is related to sip.
here what the scenario is:
phone call should be generated from some local number ( like from my
home phone or my cell phone) to a sip phone. The platfrom used in
the placement of the call is managed by voice command.(platform has
voice command system)
Now the issue is that when some one call from a local phone to a sip
phone , my cgi/perl script is suppose to have a samll user agent which
would call the sip phone in turn. so it looks something like this:
localphone --> company platform ( cgi/perl script) --> sipphone.
I have not done any work with UA so far. and have no idea where to
start from. so please if some one can point out some info or could
provied some help.
thanks
Nipa
------------------------------
Date: 17 Jul 2001 17:48:48 GMT
From: rene.nyffenegger@gmx.ch (Rene Nyffenegger)
Subject: Re: writing user agent
Message-Id: <Xns90E151D2E3964gnuegischgnueg@130.133.1.4>
>I have not done any work with UA so far. and have no idea where to
>start from. so please if some one can point out some info or could
>provied some help.
>
>thanks
>Nipa
use LWP::RobotUA;
or
use LWP::UserAgent;
(to be downloaded from www.cpan.org)
Hth
Rene
--
http://www.adp-gmbh.ch/
rene dot nyffenegger at adp-gmbh dot ch
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 1319
***************************************