[8063] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

resending truncated digests issues 1680-1683

daemon@ATHENA.MIT.EDU (Perl-Users-Request@ruby.OCE.ORST.E)
Tue Jan 20 17:07:08 1998

Date: Tue, 20 Jan 98 12:38:03 -0800
From: Perl-Users-Request@ruby.OCE.ORST.EDU
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 20 Jan 1998     Volume: 8 Number: 1680

Today's topics:
    Re: "LWP::Simple;" Problem (brian d foy)
        A stand alone Perl server to augment NT? <orangutan@grungyape.com>
    Re: Accessing mSql server from Perl (brian d foy)
        Bug in perlfunc?  [was Re: Odd syntax problem] (Tad McClellan)
        Contract Requirement - Wilts, UK. PERL Programmer <CONTRACTS@formula.demon.co.uk>
        DB_File.xs parse errors. <ckc@dmi.dk>
    Re: Detecting the presence of a sub declaration <rra@stanford.edu>
    Re: Detecting the presence of a sub declaration <rra@stanford.edu>
    Re: emulating post (brian d foy)
        Forms and Perl <rgambill@census.gov>
    Re: Forms and Perl <mz4.0-br@ndon.com>
    Re: Forms and Perl (brian d foy)
    Re: Forms and Perl <perlguy@inlink.com>
        Getting Perl to print HTML form data <brett@moggy.com>
    Re: Going Nuts with a simple script! Help! (Tad McClellan)
    Re: Going Nuts with a simple script! Help! (brian d foy)
    Re: Going Nuts with a simple script! Help! (John)
    Re: Help Please (brian d foy)
    Re: how do i get full path to $0 <xxTony.Curtis@vcpc.univie.ac.at>
    Re: I need a man to lick me in to a frenzy!!! (Jay Flaherty)
    Re: I need a man to lick me in to a frenzy!!! <dballing@speedchoice.com>
        IsDate and IsNumeric available? <A.Chui@orbis.co.uk>
    Re: Local ISP POST is good, AOL POST returns error (brian d foy)
        Netscape adress book? kalisz@usa.net
        Perl problem with IE3 <vince@vrm.co.uk>
    Re: PERL+ODBC vs Delphi for webwork (Martin Larsson)
    Re: Puzzling behavior of c.l.p.* readers (Casper H.S. Dik - Network Security Engineer)
    Re: Reload by perl - is it possible? <morten@mediafarm.no>
        space searching? (Stephen Howe)
    Re: space searching? <ckc@dmi.dk>
    Re: space searching? (Tad McClellan)
    Re: UPDATE - "LWP::Simple;" Problem (brian d foy)
        Why shift ? <eyalb@bvr.co.il>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 20 Jan 1998 08:55:27 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: "LWP::Simple;" Problem
Message-Id: <comdog-2001980855270001@news.panix.com>
Keywords: just another new york perl hacker

In article <34c398f7.11224046@News.Varian.COM>, !pbuckley@tiac.net posted:

> I am receiving the following error message:
> 
> Can't locate LWP/Simple.pm in @INC (@INC contains:

you either need to install LWP [1] or adjust @INC to include the
directory which has your local modules.

good luck :)

[1]
Comprehensive Perl Archive Network
<URL:http://www.perl.com>

-- 
brian d foy                                 <http://computerdog.com>


------------------------------

Date: Tue, 20 Jan 1998 09:39:13 -0500
From: "Franklin L. Petersen" <orangutan@grungyape.com>
Subject: A stand alone Perl server to augment NT?
Message-Id: <6a2cse$afs$1@cletus.bright.net>

Has anyone ever done this and is is possible?

I have a small farm of nearly 10 NT IIS3 FP97/98 Servers and would like to
add a stand alone HP-UX or LInus server to basically be my perl/cgi
resource.

I know I can add perl 5 to each NT system, but I would prefer to forgo that
choice and just run a single server to do all my scripting for the time
being.

I can add a UNC drive map to this box from each of the NT servers to
"appear" as if the cgi-bin is local.

Can anyone for see a big problem?

Thanks,
Frank




------------------------------

Date: Tue, 20 Jan 1998 08:38:24 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Accessing mSql server from Perl
Message-Id: <comdog-2001980838240001@news.panix.com>
Keywords: just another new york perl hacker

In article <6a1k4j$9v8@triton.np.ac.sg>, Query???? posted:

>     I'm a newbie to Perl. I would like to access a mSql server running
> on NT from a unix box.  Is there any way that I can do that via Perl?

see the various Database modules on CPAN <URL:http://www.perl.com>.

good luck :)

-- 
brian d foy                                 <http://computerdog.com>


------------------------------

Date: Tue, 20 Jan 1998 06:38:51 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Bug in perlfunc?  [was Re: Odd syntax problem]
Message-Id: <rs52a6.73s.ln@localhost>

Dan Boorstein (danboo@negia.net) wrote:
: System Administrator wrote:

[snip]

: > b)
: > 
: >         $_ = join('/', splice(split(/\//, $_), -1, 1)) if (/=/);
: > 
: > However, in practice, (a) works, and (b) generates a syntax error right
: > before the split() call:
: > 
: > $ perl -c tasks
: > syntax error in file tasks at line 120, next 2 tokens "(split"
: > 
: > Can anyone shed any light on this?

: i think so. my version of perl (5.004_02, win32) says:

:   Type of arg 1 to splice must be array (not split) at - line 1, near
: "1)"

: many times arrays and lists can be treated as if interchangeable, but
: in this case a true array is needed as the first argument to splice.

: the function definition even displays the existence of this difference
: by defining the args as 'splice ARRAY, OFFSET, LENGTH, LIST'. note the
: distinct usage of both array and list.



Looks to me that the description for split() is wrong then:

   "Splits a string into an array of strings, and returns it."
                            ^^^^^
                            ^^^^^ should say 'list' here ?


Because farther down it gets it right:

   "produces the list value..."


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 20 Jan 1998 12:05:08 +0000
From: Alan Thake <CONTRACTS@formula.demon.co.uk>
Subject: Contract Requirement - Wilts, UK. PERL Programmer
Message-Id: <oBjm1HA0LJx0EwUC@formula.demon.co.uk>

Alan Thake

Formula System Resources Ltd
7a Milburn Road
Westbourne
Bournemouth
BH4 9HJ

I have 2 contract vacancies, based in Wiltshire for Perl programmers.
These are 3 months initially + extensions and I need one to start in Feb
and one in March.

If these are of interest please could you send me you CV and I will
phone/reply immediately.

E:Mail: contracts@formula.demon.co.uk

Thanks

Alan Thake

-- 
Alan Thake, Formula System Resources Ltd. Tel: 01202 752660.


------------------------------

Date: 20 Jan 1998 14:41:47 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: DB_File.xs parse errors.
Message-Id: <wvp4t2zw9d0.fsf@edb.ejoper.dmi.min.dk>

[Posted in both misc and modules since I'm not really sure whether
DB_File is an 'extension' or a 'module', or indeed whether there is
any semantic difference between the two terms.]

Hi, guys.

I've been wanting to install DB_File, and today I started. First I
found out we didn't have db (duh), so I installed that. All well and
good. Then I finally got to installing DB_File. It bombed out with, of
all things, a parse error in DB_File.xs:

,-----
| gcc -c  -I/usr/local/include -I/pack/local/include/db -O \
|     -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" -fpic \
|     -I/pack/perl-5.004_04/lib/sun4-solaris/5.00404/CORE  DB_File.c
|
| DB_File.xs:77: parse error before `HASHINFO'		
| DB_File.xs:77: warning: no semicolon at end of struct or union
| DB_File.xs:78: warning: data definition has no type or storage class
| DB_File.xs:79: parse error before `btree'		
| DB_File.xs:79: warning: data definition has no type or storage class
| DB_File.xs:89: field `info' has incomplete type		
| DB_File.xs:132: parse error before `Value'		
| DB_File.xs:132: warning: data definition has no type or storage class
| DB_File.xs:134: parse error before `zero'		
| DB_File.xs:134: warning: data definition has no type or storage class
| DB_File.xs:135: `recno_t' undeclared here (not in a function)
| DB_File.xs: In function `GetArrayLength':		
| DB_File.xs:332: structure has no member named `seq'	
| DB_File.xs:332: `R_LAST' undeclared (first use this function)
| DB_File.xs:332: (Each undeclared identifier is reported only once
| DB_File.xs:332: for each function it appears in.)	
| DB_File.xs: At top level:				
| DB_File.xs:342: parse error before `GetRecnoKey'	
| DB_File.xs: In function `ParseOpenInfo':		
| DB_File.xs:410: dereferencing pointer to incomplete type
`----->8

There followed a couple hundred lines of other warnings and errors,
which I assumed were a result of those above.

I'm using the DB_File included in 5.004_04.

Thanks in advance for any info you might see fit to send my way.

Kvan, pretty miffed about the whole thing.
-- 
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- |  unattempted is impossible.'
           Lokal  544            |   
I do not speak for DMI, just me. |        - Lord Mhoram, Son of Variol.      


------------------------------

Date: 20 Jan 1998 06:33:54 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Detecting the presence of a sub declaration
Message-Id: <m3btx7b4fh.fsf@windlord.Stanford.EDU>

Denis Goddard <dgoddard@us.oracle.com> writes:
> Russ <rra@stanford.edu> said:

>> Russ> What I'm looking for is an implementation of
>> Russ> sub_exists().
>> 
>> defined &$subname
>> 
>> should be what you want, I think.

> Yes. And for lots of good info on similar stuff, see the *excellent*
> book _Advanced Perl Programming_, by S. Srinivasan

Have it, read it, it does not answer this question or I wouldn't be asking
the question in the newsgroup.  sub_exists should return true if the sub
has been *declared*, not just defined.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


------------------------------

Date: 20 Jan 1998 06:32:59 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Detecting the presence of a sub declaration
Message-Id: <m3en23b4h0.fsf@windlord.Stanford.EDU>

Joseph N Hall <joseph@5sigma.com> writes:

> Golly, that does work! You learn something new every day!
> So why doesn't *{$subname}{BAR} work?

>> > Russ> What I'm looking for is an implementation of
>> > Russ> sub_exists().
>> >
>> > defined &$subname
>> >
>> > should be what you want, I think.

What *are* you people talking about?  defined &$subname does *NOT* work
for the problem I'm trying to solve and *{$sub}{CODE} does.

Here, see for yourself:

#!/usr/bin/perl
sub foo;
$sub = 'foo';
print ((defined &$sub) ? "yes\n" : "no\n");
print ((defined *{$sub}{CODE}) ? "yes\n" : "no\n");

outputs:

no
yes

under Perl 5.004_04 and 5.003.  I'm trying to detect the existence of a
*predeclaration* for a sub, not the existence of a sub definition (which
is what defined &subname checks for).

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


------------------------------

Date: Tue, 20 Jan 1998 09:00:06 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: emulating post
Message-Id: <comdog-2001980900060001@news.panix.com>
Keywords: just another new york perl hacker

In article <6a0khq$8n01@ns1.epresence.com>, "Jay Stewart" <jstewart@epresence.com> posted:

> How do I emulate a post  from  a server side script?

use the LWP family of modules [1].  the documentation comes with plenty
of examples.

good luck :)

-- 
brian d foy                                 <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


------------------------------

Date: Tue, 20 Jan 1998 07:21:41 -0600
From: Ron Gambill <rgambill@census.gov>
To: ronald.p.gambill.jr@ccmail.census.gov
Subject: Forms and Perl
Message-Id: <885301746.1586102279@dejanews.com>

Let me preface this: I know that this is a simple question, yet I haven't
run across it in any FAQs or in the group. Of course, that means I still
need help... ;)

I've installed Perl for Win32 on the NT server and will be using it to
generate HTML pages based on responses (checkboxes, etc.) that I receive
from a form. What is the correct syntax for the "action" in the HTML?

Or if you could point me in the right direction?

Thanks in advance for any help!

-Ron
rgambill@census.gov

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


------------------------------

Date: Tue, 20 Jan 1998 08:52:05 -0500
From: Brandon Golm <mz4.0-br@ndon.com>
Subject: Re: Forms and Perl
Message-Id: <34C4AC05.3FDE059B@ndon.com>

> I've installed Perl for Win32 on the NT server and will be using it to
> generate HTML pages based on responses (checkboxes, etc.) that I receive
> from a form. What is the correct syntax for the "action" in the HTML?
>
> Or if you could point me in the right direction?

  Well, it's not exactly a PERL question, but is this what you need?

<FORM ACTION="http://www.dns.name/cgi-bin/form.pl" METHOD="POST"> <!-- POST
or GET -->

<INPUT NAME="first_name" VALUE="you">
<INPUT TYPE="submit">

</FORM>



------------------------------

Date: Tue, 20 Jan 1998 09:06:32 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Forms and Perl
Message-Id: <comdog-2001980906320001@news.panix.com>
Keywords: just another new york perl hacker

In article <885301746.1586102279@dejanews.com>, Ron Gambill <rgambill@census.gov> posted:

> Let me preface this: I know that this is a simple question, yet I haven't
> run across it in any FAQs or in the group.

> I've installed Perl for Win32 on the NT server and will be using it to
> generate HTML pages based on responses (checkboxes, etc.) that I receive
> from a form. What is the correct syntax for the "action" in the HTML?

maybe you didn't run across it in the FAQs because it has
nothing to do with Perl.  Check the HTML specification (which is 
probably online somewhere).

good luck :)

-- 
brian d foy                                 <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


------------------------------

Date: Tue, 20 Jan 1998 14:04:09 GMT
From: Brent Michalski <perlguy@inlink.com>
To: Ron Gambill <rgambill@census.gov>
Subject: Re: Forms and Perl
Message-Id: <34C4AED9.3425EB65@inlink.com>

Do you mean like:

<FORM ACTION="http://your.server.com/scripts/myscript.pl" METHOD=POST>


Brent Michalski
http://www.inlink.com/~perlguy/simple  
(Perl Database Tutorial)


------------------------------

Date: Wed, 21 Jan 1998 00:28:56 +1100
From: "Brett" <brett@moggy.com>
Subject: Getting Perl to print HTML form data
Message-Id: <6a291q$np5$1@droppa.tpgi.com.au>

Following my recent posting ("Helpful People"), I received a few positive
responses - and some encouragement to post this problem I have in this
newsgroup.  Therefore I am going to attempt to explain the problem.
I purchased a script for running a Classified Ad site, and set it up
successfully.  The problem was that the script didn't have all the fields
that I wanted on the HTML form.  So, I added the extra fields to the HTML
form, and tried to get that to work hand-in-hand with the writead.pl file
(which I assume works directly with the form).
I was successful in getting the file to read the HTML form fields, but it
wouldn't read the input.
I'll post part of the HTML form below, followed by a section of the Perl
script, and hopefully one keen master of diagnostics will pick up the error.
(PS, I'm trying hard to learn Perl, but it's a slow process for me, is that
normal?)
 ...*SNIP*
<TR>
 <TD ALIGN=CENTER COLSPAN=3><FONT FACE="VERANDA, ARIAL" SIZE=2
COLOR="#FFFFFF"><B>Card   Type:</B></TD>
 </TR>
 <TR>
 <TD ALIGN=CENTER><input type=radio name="Type" VALUE="BankCard"></TD>
 <TD ALIGN=CENTER><input type=radio name="Type" VALUE="MasterCard"></TD>
 <TD ALIGN=CENTER><input type=radio name="Type" VALUE="Visa"></TD>
 </TR>
 <TR>
 <TD ALIGN=CENTER><FONT FACE="VERANDA, ARIAL" SIZE=2
COLOR="#FFFFFF">BankCard</TD>
 <TD ALIGN=CENTER><FONT FACE="VERANDA, ARIAL" SIZE=2
COLOR="#FFFFFF">MasterCard</TD>
 <TD ALIGN=CENTER><FONT FACE="VERANDA, ARIAL" SIZE=2
COLOR="#FFFFFF">Visa</TD>
 </TR>
 </TABLE>
</TD>
</TR>
<TR>
<TD ALIGN=CENTER><FONT FACE="VERANDA, ARIAL" SIZE=2 COLOR="#FFFFFF"><B>Name
on Card:<BR></B><BR><INPUT TYPE=TEXT NAME="Holder" SIZE=20></FONT></TD>
<TD ALIGN=CENTER><FONT FACE="VERANDA, ARIAL" SIZE=2
COLOR="#FFFFFF"><B>Expiry Date:<BR></B><FONT
SIZE=1><I>dd/mm/yy</I></FONT><BR><INPUT TYPE=TEXT NAME="Expiry"
SIZE=8></FONT></TD>

Now the data from the writead.pl file:
if (($in{'Name'} eq "") && ($in{'Address'} eq "") && ($in{'City'} eq "") &&
($in{'Number'} eq "") && ($in{'Type'} eq "") && ($in{'Holder'} eq "") &&
($in{'Expirey'} eq "") && ($in{'State'} eq "") && ($in{'ZipCode'} eq "")) {

  &PrintHeader;
  print "$Header\n";
  print qq!<center><h2><font color="FF0000">Form Contains Missing
Data</font></h2></center>\n!;
  print "<b>You did not fill in all fields in the form.  Your ad cannot be
placed on the system without all fields being filled in.  Please go back and
enter in the requested information into each field.<p>\n";
  print "<pre>\n";
  print qq!          Name: <font
color="$AdSubColor">$in{'Name'}</font><br>\n!;
  if ($ValidEmail eq "yes") {
  print qq!E-Mail Address: <font
color="$AdSubColor">$in{'E-Mail'}</font><br>\n!;
  }
  print qq!       Address: <font
color="$AdSubColor">$in{'Address'}</font><br>\n!;
  print qq!          City: <font
color="$AdSubColor">$in{'City'}</font>&nbsp;&nbsp;&nbsp; State: <font
color="$AdSubColor">$in{'State'}</font> &nbsp;&nbsp;Zip Code: <font
color="$AdSubColor">$in{'ZipCode'}</font><br>\n!;
  print qq!   Card Number: <font
color="$AdSubColor">$in{'Number'}</font><br>\n!;
  print qq!     Card Type: <font
color="$AdSubColor">$in{'Type'}</font>&nbsp;&nbsp;&nbsp; Card Holder: <font
color="$AdSubColor">$in{'Holder'}</font> &nbsp;&nbsp;Expirey: <font
color="$AdSubColor">$in{'Expirey'}</font></b></pre><br>\n!;
  print "$Footer2\n";
  exit;
 }
 elsif (($ValidEmail eq "yes") && ($in{'E-Mail'} !~ /^.+\@.+\..+/)) {
  &PrintHeader;
  print "$Header\n";
  print qq!<center><h2><font color="FF0000">Invalid E-mail address
format</font></h2><p>\n!;
  print "<b>Please enter a valid E-mail address. An AD cannot be placed on
this system<br>\n";
  print "unless you include your E-mail address!</b>\n";
  print "$Footer2\n";
  exit;
 }
 elsif ($in{'Phone'} eq "") {
  &PrintHeader;
  print "$Header\n";
  print qq!<center><h2><font color="FF0000">Phone Number
Missing</font></h2></center>\n!;
  print "<b>A valid phone number must be entered in order for the AD to be
placed on the system.  This is used to confirm your AD when you renew it, or
if you request us to delete your AD before the expiration date.<p>\n";
  print qq!<center><font color="FF0000">Please go back and enter your phone
number in the space provided.</font></b></center><p>\n!;
  print "$Footer2\n";
  exit;
 }

There are other Perl scripts involved in the Classified Ad script... they
are:  notice.pl, renewad.pl, viewad.pl, del_ad.pl.
I would have assumed that these didn't affect the input on the HTML form
when submitting a new ad.  Am I right?

Hey, thank you very heaps in advance.  I appreciate you even reading this
far.  Hope you can help and I hope I can offer you something in return.

Best regards,
Brett Phillips
moggy.com  - Australia




------------------------------

Date: Tue, 20 Jan 1998 07:18:24 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Going Nuts with a simple script! Help!
Message-Id: <0782a6.e8s.ln@localhost>

John (nospam43423123@hotmail.com) wrote:
: I want to use perl to read the contents of a web page, and then
: display that data inside another web page.

[snip]

: I tried this script but it totally does not work...

: #!/usr/local/bin/perl


You should *always* use the -w switch you know...

   #!/usr/local/bin/perl -w

: $file = "http://www.internetweather.com/data/209.30.0.9/";
: open(INFO, $file);


You should *always* check the return value from open() calls.

   open(INFO, $file) || die "could not open '$file'  $!";


: @lines = <INFO>;
: close(INFO);
: print "<a href=\"http://www.internetweather.com/data/209.30.0.9/\">";
: print "@lines</a><br>";


Of course that doesn't work.

Perl is a general purpose programming language. It is not purpose
build to recognize/do something with the HyperText Transfer
Protocol (HTTP) references.

You can *ask* it to do HTTP stuff though. See below.


[ you know that it will print a space between each element of @lines? 
  (because you put it in double quotes. See the description of $"
   in the 'perlvar' man page)
]


: so back to the big question.  I want to open a file called
                                               ^^^^^^

Assuming that it is a file is a bad assumption. It may be generated
by a program. Like a CGI program, such as the one you are writing  ;-)

Unless, of course, it is on the same server as your CGI script. But
then you would just open() the file and read it. No HTTP involved
there.


: http://something  Then I want to take the guts of that file, and stick
: it inside another web page.  And I want to run it using an SSI call.
: How can I do this with perl?


The LWP module can communicate using the HTTP.

Use it to fetch the contents of the other page, then print it in the
middle of your new page.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 20 Jan 1998 08:42:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Going Nuts with a simple script! Help!
Message-Id: <comdog-2001980842090001@news.panix.com>
Keywords: just another new york perl hacker

In article <34c43a06.319260954@news.flash.net>, nospam43423123@hotmail.com posted:

> I want to use perl to read the contents of a web page, and then
> display that data inside another web page.

use the LWP family of modules [1].  the documentation has lots of 
examples of just this sort of thing.

good luck :)

[1] Comprehensive Perl Archive Network
<URL:http://www.perl.com>

-- 
brian d foy                                 <http://computerdog.com>


------------------------------

Date: Tue, 20 Jan 1998 13:42:58 GMT
From: nospambooger@flash.net (John)
Subject: Re: Going Nuts with a simple script! Help!
Message-Id: <34c7a8a1.347580310@news.flash.net>

On Tue, 20 Jan 1998 07:18:24 -0600, tadmc@flash.net (Tad McClellan)
wrote:

>
>Assuming that it is a file is a bad assumption. It may be generated
>by a program. Like a CGI program, such as the one you are writing  ;-)
>

I think you have hit the nail on the head with this statement.  My
solution was to use the IFRAME tags to make a floating frame and it
works fine.

Thanks for the lesson.  I was expecting major flames for posting
anything related to html here, but then again, Abigail probably hasn't
gotten to work yet today :)  Thanks for taking the time to help a
newbie.


------------------------------

Date: Tue, 20 Jan 1998 08:50:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Help Please
Message-Id: <comdog-2001980850030001@news.panix.com>
Keywords: just another new york perl hacker

In article <6a12sd$fv$1@vixen.cso.uiuc.edu>, c-hammer@students.uiuc.edu (corey andersen hammer) posted:

> I'm writing a script using cgi-lib.pl. 

use CGI.pm;  # something current...

-- 
brian d foy                                 <http://computerdog.com>


------------------------------

Date: 20 Jan 1998 12:13:14 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
To: john.crawshaw@london.pgs.com
Subject: Re: how do i get full path to $0
Message-Id: <7x67nf760l.fsf@vcpc.univie.ac.at>

Re: how do i get full path to $0, John
<john.crawshaw@london.pgs.com> said:

John> file. I know $0 gives me the program name and also
John> File::Basename will give me something similar but how
John> do I get the full path to where its called from. The

The answer (of course) is in

    perldoc File::Basename


    dirname - extract just the directory from a path

hth,
tony


------------------------------

Date: 20 Jan 1998 13:48:56 GMT
From: fty@hickory.engr.utk.edu (Jay Flaherty)
Subject: Re: I need a man to lick me in to a frenzy!!!
Message-Id: <6a2a08$1s1$1@gaia.ns.utk.edu>

Tom Phoenix (rootbeer@teleport.com) wrote:
: On Mon, 19 Jan 1998, Andrew Spiers wrote:
: 
: > Which module does this ? cgi - or is it lwp
: 
: For this purpose, those modules really suck. 
: 
: Uhm... I mean... Never mind.

I think a simple while loop will suffice:

while(!($frenzy)) {
	lick_me();
}

jay ;-)  
--
**********************************************************************  
Jay Flaherty                                               fty@utk.edu
"Once in awhile you get shown the light, in the strangest of places if
you look at it right" - R. Hunter
**********************************************************************



------------------------------

Date: Tue, 20 Jan 1998 08:34:17 -0600
From: Derek Balling <dballing@speedchoice.com>
Subject: Re: I need a man to lick me in to a frenzy!!!
Message-Id: <3A712D6DB75D79D8.DE549D7AE2C874FC.1E6E6C5DF003F5C1@library-proxy.airnews.net>

Jay Flaherty wrote:
> while(!($frenzy)) {
>         lick_me();
> }

I would think

while(!($frenzy)) {
         lick($me);
 }

would be more appropriate. Always code your functions as general
purpose. What if she wants you to lick her friend? Are you gonna rewrite
a whole new function that does essentially the same task? Even better
would be:

push @licked, $me;
while(!($frenzy)) {
         lick(\@licked);
 }

So if it was a group grope thing your function would be covered as well.
:)

Derek
(and there's no WAY I speak for my employers on this one)


------------------------------

Date: 20 Jan 98 13:43:40 GMT
From: "Atta Chui" <A.Chui@orbis.co.uk>
Subject: IsDate and IsNumeric available?
Message-Id: <01bd25a9$cb60c760$e37599c3@peugeot>

Hi there,

I'm trying to parse some text files. One problem is to find out whether or
not a sub-string is a valid date. Similarly whether or not a sub-string is
a valid real number.

IsNumeric:
Maybe I can match a string with
  /[+-]?[1-9]\d*(.\d*)?([Ee][+-]?\d*)?/
but still I don't know if the number would not be out of range.

IsDate:
I can get
  ($d, $m, $y) =~ m#\d+/\d+/\d+#
and then test the range for each variable, looks tedious.

If you have a better way to do it, or there are source codes available,
please let me know.

Thanks.

Atta Chui.
A.Chui@orbis.co.uk



------------------------------

Date: Tue, 20 Jan 1998 08:47:23 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Local ISP POST is good, AOL POST returns error
Message-Id: <comdog-2001980847230001@news.panix.com>
Keywords: just another new york perl hacker

In article <19980119235500.SAA15448@ladder01.news.aol.com>, drsfasaype@aol.com (DRSFASAYPE) posted:

> I'm using a CGI script to POST form data to a web site and return data via
> e-mail. E-mail works for local ISP dial up and AOL. POST routine works for ISP
> but returns message: Cannot retrieve http://www.dwbp-onlinPOST at AOL.

find the source of that error message (using standard debugging
techniques) and fix that.  if you get stuck on a Perl related issue,
post a snippet of the relevant code and we'll see what we can do.

if you are not already using the LWP modules, they might cure your
problem.

good luck :)

-- 
brian d foy                                 <http://computerdog.com>


------------------------------

Date: Tue, 20 Jan 1998 08:21:50 -0600
From: kalisz@usa.net
To: mika@sweden.hp.com
Subject: Netscape adress book?
Message-Id: <885296759.1459945477@dejanews.com>

Hello

Does anyone know the format of
how the netscape 4.x addressbook is stored???
(abook.nab)

I would like to be able to print/change the contents of the
the addressbook using a perl but I can't figure out the format.

I downloaded the "Netscape::History" and it works great but the format
of the abook.nab  seems different (not Berkley DB, magicnumber=0x000f4244)
(correct me if I'm wrong)

So has anyone already written a program like that or does anyone know
how it should be done. Please let me know.

Thanks in advance

Michael

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


------------------------------

Date: 20 Jan 1998 14:12:56 GMT
From: "Vince" <vince@vrm.co.uk>
Subject: Perl problem with IE3
Message-Id: <01bd25ad$08f9cb00$d201a8c0@farhans>

Hi,

Can you help please? I've a Perl script that accepts search data from a
page, this data is used to search some flat files that are delimited by "|"
and returns the found items in a web page. 

This script works fine in NS3, NS4 and IE4, but in IE3 it does not finish
creating the page, always at the same point it stops. Is there a problem
with IE3?

Vince
Milton Keynes


------------------------------

Date: Tue, 20 Jan 1998 14:34:06 +0100
From: martin.larsson@delfidata.no (Martin Larsson)
Subject: Re: PERL+ODBC vs Delphi for webwork
Message-Id: <MPG.f2ec63cf96389a09896cc@193.212.1.36>

In article <6a0ee5$hl9$1@nntp.ucs.ubc.ca>, jefferyc@unixg.ubc.ca says...
>
> I've implemented a stopgap solution using PERL32 and the ODBC
> library, but the ODBC driver we're using (by MS, came bundled
> with Office97 Dataacc package) is failing with an obscure error
> that MS won't solve for me. 

 ... jumping to conclusions, but if you're using IIS, and Perl is in a DLL 
loaded by IIS, you might have concurrency problems. ODBC drivers usually 
don't (or didn't) care about multiple users since they were mostly run 
from Windows 3.1... An upgraded ODBC driver might be all you need.

As for using Delphi, it's a really good Windows RAD tool. And it's loads 
of fun learning and using it. But if you know Perl and need something 
cheap now, you might do it faster with specialized tools (dbWeb, 
InterDev, IntraBuilder, Cold Fusion (as others commented) and so on).

M.

-- 
Author of several unknown utilities for DOS and Windows.
http://www.delfidata.no/users/~martin
mailto:martin.larsson@delfidata.no


------------------------------

Date: 20 Jan 1998 11:22:37 GMT
From: Casper.Dik@Holland.Sun.Com (Casper H.S. Dik - Network Security Engineer)
Subject: Re: Puzzling behavior of c.l.p.* readers
Message-Id: <casper.885295743@uk-usenet.uk.sun.com>

[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

David Cross <Dave.Cross@gb.swissbank.com> writes:

}nvp@shore.net (Nathan V. Patwardhan) writes:

}> 
}> Randal Schwartz (merlyn@stonehenge.com) wrote:
}> 
}> : There's always some looney in the crowd that says "hey, this shouldn't
}> : be discussed here... please take to to rec.aquaria!"
}> 
}> Well, at least nobody's mentioned Hitler or Mussolini yet.  ;-)

}You have now! You lose!!


Besides, Randall is wrong.  It should be discussed in sci.aquaria, not
rec.aquaria.

Casper

--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.


------------------------------

Date: Tue, 20 Jan 1998 09:50:18 +0100
From: "Morten Tvedten" <morten@mediafarm.no>
Subject: Re: Reload by perl - is it possible?
Message-Id: <6a2599$u8c$1@thelma.netpower.no>

You can load a page by sending the HTTP header to yhe browser with the URL
for that page for example:

print "Location:http://www.yourserver.com/yourpage.com\n\n";

This will make the browser to that page.
Morten

Nuno Borges skrev i meldingen <34C38B32.F7ED42FA@ccg.uc.pt>...
>I don't know if my question is stupid or not, but i'd like to get an
>answer...
>Is it possible to make a reload by a command of perl? Is there any
>language that permit to do so?
>
>Thanks.
>




------------------------------

Date: Tue, 20 Jan 1998 11:34:53 GMT
From: stephen@bcl.com (Stephen Howe)
Subject: space searching?
Message-Id: <34c48b3e.8667800@194.72.35.45>

Dear guys...

I've got a desperate need to know how to do this so i'm begging for
help..

I have a line saying 
To: stephen@solamnia.demon.co.uk, stephen@bcl.com, daryn@blahblah.com

etc..
I need to know how to figure out the user associated with ONLY the
bcl.com site...

If I search the string for bcl.com, I can get the index of the
bcl.com... then I need to backtrack, searching for a blank space at
every step, then substr from the position of the whitespace, to the
position of the @.

Any ideas... please?

Thank you HEAPS and HEAPS... I really need this help :(

Stephen Howe


------------------------------

Date: 20 Jan 1998 13:02:29 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: Re: space searching?
Message-Id: <wvpn2grxsiy.fsf@edb.ejoper.dmi.min.dk>

stephen@bcl.com (Stephen Howe) writes:

> I have a line saying 
> To: stephen@solamnia.demon.co.uk, stephen@bcl.com, daryn@blahblah.com
> 
> etc..
> I need to know how to figure out the user associated with ONLY the
> bcl.com site...

So you want the 'stephen' sequence which is followed by '@bcl.com'.

> If I search the string for bcl.com, I can get the index of the
> bcl.com...

Yes, matching with /bcl\.com/ would find the string.

> then I need to backtrack, searching for a blank space at
> every step, then substr from the position of the whitespace, to the
> position of the @.

This is not very desirable, is it? In fact, it sounds so strange it
should lead you to think in other terms. Regexes, for instance.

What you want to do is use capturing parentheses:

/(\w)+@bcl\.com/

And then use $1 and friends to extract the user name.

Kvan, hoping this helps.
-- 
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- |  unattempted is impossible.'
           Lokal  544            |   
I do not speak for DMI, just me. |        - Lord Mhoram, Son of Variol.      


------------------------------

Date: Tue, 20 Jan 1998 06:12:39 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: space searching?
Message-Id: <nb42a6.72s.ln@localhost>

Stephen Howe (stephen@bcl.com) wrote:

: I have a line saying 
: To: stephen@solamnia.demon.co.uk, stephen@bcl.com, daryn@blahblah.com

: etc..
: I need to know how to figure out the user associated with ONLY the
: bcl.com site...

[snip]

: Any ideas... please?


------------------------------------
#!/usr/bin/perl -w

$_ = 'To: stephen@xyzbcl.com, stephen@BCL.COM, daryn@blahblah.com, ada@bcl.com';

# all on one line:  while ( /(\S+\Wbcl\.com)(?:,|$)/gi ) {

while ( /(            # remember matched chars in $1
          \S+         #   one or more non-whitespace chars
          \W          #   a non-word char ('at' or 'dot')
          bcl\.com    #   constant string 'bcl.com'
         )            # stop remembering matched chars
         (?:          # group match, but don't remember any chars
          ,           #   a comma
          |           #   or
          $           #   end of string
         )            # end of grouping
        /gix ) {      # g: global  i: ignore case  x: allow comments here
   $addr = $1;
   print "'$addr'\n";
}
------------------------------------


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 20 Jan 1998 09:03:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: UPDATE - "LWP::Simple;" Problem
Message-Id: <comdog-2001980903090001@news.panix.com>
Keywords: just another new york perl hacker

In article <34c3a2c7.13736543@News.Varian.COM>, !pbuckley@tiac.net posted:

> [Mon Jan 19 13:54:56 1998] [error] [7162] (35)Resource temporarily
> unavailable: couldn't spawn child process:
> /home/us001287/cgi-bin/stockquote.pl

looks like a web server problem, not a Perl or LWP problem.  check 
in a newsgroup devoted to your server product and platform.

good luck :)

-- 
brian d foy                                 <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


------------------------------

Date: Tue, 20 Jan 1998 16:24:41 +0200
From: Eyal <eyalb@bvr.co.il>
Subject: Why shift ?
Message-Id: <34C4B3A9.41C6@bvr.co.il>

Hi,

from the Programming Perl book (P. 118) :


$rec =  get_rec(\*STDIN);

sub get_rec {
	my $fh = shift;
	return scalar <$fh>;
}

why use shift ?  

Thanks
	Eyal


------------------------------

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1680
**************************************

home help back first fref pref prev next nref lref last post