[6749] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 374 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 25 20:07:13 1997

Date: Fri, 25 Apr 97 17:00:27 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 25 Apr 1997     Volume: 8 Number: 374

Today's topics:
     Re: $1 var question <tchrist@mox.perl.com>
     Re: Bizarre question of the day...precedence with typeg (Clark Jefcoat)
     Re: Bizarre question of the day...precedence with typeg (Clark Jefcoat)
     Calling Win32 Perl from DELPHI <mliesen@netg.se>
     Re: Challenge <plussier@synnet.com>
     Re: DOS Perl versions:  Why won't they work for me? (Bruce Atherton)
     Re: DOS Perl versions:  Why won't they work for me? (Ilya Zakharevich)
     Ftp. nntp, http how to access the protocols with a perl (TwoFlower iN dA HoUZe)
     Re: Ftp. nntp, http how to access the protocols with a  (Nathan V. Patwardhan)
     Re: Help with Filehandles lusol@turkey.cc.Lehigh.EDU
     Re: Need source for calling search engines <johnh@isi.edu>
     Re: newbie question: no data found? (Tad McClellan)
     Re: Notice to antispammers <tchrist@mox.perl.com>
     Re: Notice to antispammers (Nathan V. Patwardhan)
     Re: Notice to antispammers (Kent Perrier)
     Re: Odd array sizing information <tom@geronimo.uit.no>
     Re: Perl for VMS ver5.5 (Dan Sugalski)
     PERL to dBase dbf <keys101@wgn.net>
     Re: Randal Teaching Open Perl Class in NYC/Northern NJ  <tchrist@mox.perl.com>
     Re: Randal Teaching Open Perl Class in NYC/Northern NJ  <stevev@dynamicweb.com>
     References in foreach loop variable <kraven@keystone.westminster.edu>
     Substitute File Path For URL <stvsloan@longbow.com>
     Re: Substitute File Path For URL (David Alan Black)
     Re: They both suck! (was: Borland or Microsoft compiler <mbracey@interaccess.com>
     Re: undump revisited? (Nathan V. Patwardhan)
     Re: undump revisited? <tchrist@mox.perl.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 25 Apr 1997 21:07:26 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: $1 var question
Message-Id: <5jr6ee$cva$3@csnews.cs.colorado.edu>


 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, abigail@fnx.com writes:
:What is $1 now? Is it "o", or did the scope end because to the
:match in the inclosed block (and hence it's undefined)?

Gee, I wonder how you could find out?

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    Hey, I had to let awk be better at *something*...  :-)
            --Larry Wall in <1991Nov7.200504.25280@netlabs.com>1


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

Date: 25 Apr 1997 15:52:25 GMT
From: jefcoat@mssg01.mb.jhu.edu (Clark Jefcoat)
Subject: Re: Bizarre question of the day...precedence with typeglob?
Message-Id: <5jqjvp$461@news.jhu.edu>

Jon Adams (jadams@pe-netsystems.com) wrote:
: The bizarre problem (aka 'time-sink') of the day...

[snip]

: 	my $thisFile = $self->{'cgiInstance'}->param('thatThereFile');
: 	#$thisFile should now contain 'mock.html'
: 	my $ref2glob = eval("\\*$thisFile");

: @$ gives me nothing, because the eval works. ref($ref2glob) gives me
: nothing, because the resulting value is not a recognizable reference. If I
: print $ref2glob, I have something of the form 'GLOB{0x########}html'. Not
: good.

: Jon Adams
: jadams@pe-netsystems.com

[snip]

Try these lines of code to see what your eval is doing:

  my $thisFile = 'mock.html';
  my $eval_code = "\\*$thisFile";
  print "Eval will execute the statement $eval_code\n";
  my $ref2glob = eval($eval_code);
  print "Ref2glob is $ref2glob\n";

The output of that code is:
  Eval will execute the statement \*mock.html
  Ref2glob is GLOB(0x1001ad30)html

To get the result that you want, don't interpolate the
variable $thisFile.

Change the assignement of $eval_code above to 
  my $eval_code = '\\*$thisFile'; 
and the output is: 
  Eval will execute the statement \*$thisFile 
  Ref2glob is GLOB(0x1001ac04)

Changing $eval_code to "\\*\$thisFile" will also give
you the result that you want.

Hope this helps.

Clark
jefcoat@mssg01.mb.jhu.edu






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

Date: 25 Apr 1997 18:09:23 GMT
From: jefcoat@mssg01.mb.jhu.edu (Clark Jefcoat)
Subject: Re: Bizarre question of the day...precedence with typeglob?
Message-Id: <5jqs0j$45k@news.jhu.edu>

What horrible form, I'm posting a follow-up to my own post!

But why the heck am I using eval in my previous post when I don't 
interpolate any of the variables.  In my previous post I wrote
  $ref2glob = eval("\\*\$thisFile");
when
  $ref2glob = \*$thisFile;
will do the same thing.

And to make matters worse, the person who posed the original question, 
tells me that my answer doesn't do what he wants it to do.  (I must 
admit to being stumped on this one.  Doesn't what I wrote return a 
reference to a glob?)

I suppose that I'll have to chalk this one up to today being Friday.  
(My brain must have already shut down for the weekend.)

Sorry.

Clark
jefcoat@mssg01.mb.jhu.edu


Clark Jefcoat (jefcoat@mssg01.mb.jhu.edu) wrote:
:   my $thisFile = 'mock.html';
:   my $eval_code = "\\*$thisFile";
:   print "Eval will execute the statement $eval_code\n";
:   my $ref2glob = eval($eval_code);
:   print "Ref2glob is $ref2glob\n";

: The output of that code is:
:   Eval will execute the statement \*mock.html
:   Ref2glob is GLOB(0x1001ad30)html

: To get the result that you want, don't interpolate the
: variable $thisFile.

: Change the assignement of $eval_code above to 
:   my $eval_code = '\\*$thisFile'; 
: and the output is: 
:   Eval will execute the statement \*$thisFile 
:   Ref2glob is GLOB(0x1001ac04)

[snip]





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

Date: Sat, 26 Apr 1997 01:58:41 +0200
From: "Martin Liesin" <mliesen@netg.se>
Subject: Calling Win32 Perl from DELPHI
Message-Id: <5jrgff$5i9$1@endevour.netg.se>

Hi!

What is the best way to call Win32 Perl from a non C++ language, like
Delphi.

I'ld like to work directly agains the PERL300.DLL if possible, but it looks
to me
like it is restricted to C++ usage, as it returns a class.

Should I call PERL.EXE passing the script as a argument instead??

Any suggestions would be nice!


/Martin Liesin, PegaSoft.





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

Date: Fri, 25 Apr 1997 16:03:02 -0400
From: Paul Lussier <plussier@synnet.com>
To: Marty Strohofer <mstrohofer@cincom.com>
Subject: Re: Challenge
Message-Id: <Pine.GSO.3.96.970425152538.10324P-100000@pickett>

On 25 Apr 1997, Marty Strohofer wrote:

> Can anyone figure this out?
> 
> I need to generate an 8 character string (which will serve as a purchase
> req number) based on the date and time the request/form is submitted.
> 
> The string would be something like 70425n14
> 
> where 7 is the last digit in the year (1997)
> where 04 is the month
> where 25 is the day of the month
> where n is the hour (instead of 00-23, we want to use a-w)
> where 14 is the minute
> 
> Any and all help would be greatly appreciated.

Okay, here it is.  Incredibly simple.  You ought to pick up a copy of
the Camel, as I doubt many will be willing to write your code for you
in the future.  Hmm, while I'm thinking of it, since you challenged
us, I have a challenge for you.  Come up with a completely different,
more efficient method of doing this.  You can't use my code until you
do :)

#!/usr/local/bin/perl5

# Figure out what the date is.
# this is on page 72 of the perlref manual.
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

# simple var assignment here.
$letter='a';

# quick loop to assign hash table a-x to 0-23
foreach $hour (0..23) {
  $letterhour{"$hour"}=$letter;
  $letter++;	# increment by 1 each time ('a' + 1 = 'b')
}
 
$y = substr ($year,3); # substr is on page 91 of the perlref, I can think of
		       # at least 2 other ways to do this off  the top of 
		       # head :)

$month= $mon + 1;      # months are indexed beginning with 0

# If month is a single digit, prepend with a 0.
# There are many ways to do this
if ( ($month >= 0) && ($month < 10) ) { $month = "0" . $month; }


# Put 'em all together.  The '.' operator is on page 26 of the perlref
$req_num= $y . $month . $mday . $letterhour{"$hour"} . $min;
 

Since this sounds like it will be part of a bigger package, you'll
probably want to turn this into sub routine.

Good luck.

Seeya,
Paul
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Paul Lussier		=   It is a good day	=The next best thing to doing -
= 3Com S2 Division	-    to put slinkies	-something smart is not doing =
- plussier@synnet.com	=     on escalators	=      something stupid.      -
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     =			      Interesting trivia:			-
     -   If you took all the sand in North Africa and spread it out	=
     =		 ...it would cover the entire Sahara desert.		-
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



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

Date: Fri, 25 Apr 97 22:05:11 GMT
From: bruce@flair.law.ubc.ca (Bruce Atherton)
Subject: Re: DOS Perl versions:  Why won't they work for me?
Message-Id: <5jr9pa$3j5$1@nntp.ucs.ubc.ca>

In article <5jr4kp$l2v$1@mathserv.mps.ohio-state.edu>, 
ilya@math.ohio-state.edu (Ilya Zakharevich) wrote:
>> Ran this program:
>>       $res = `echo hello there`;
>>       print("Result = $res .\n");
>> 
>> Got this result:
>>       Result =  .
>
>Did you set -w flag when running it?

Yes, I tried that.  The only message concerned use of unitialized value $res 
in the print statement.

I also tried $retval = system "echo test 1 2 3";  It told me it couldn't spawn 
echo: No such file or directory.  Of course it is internal, so it wouldn't 
find it.  So I tried calling a program directly and through a batch file.  
Both times it reported that there wasn't enough memory.  My machine has 48Meg 
and 555K conventional free.

Any suggestions greatly appreciated.


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

Date: 25 Apr 1997 23:07:27 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: DOS Perl versions:  Why won't they work for me?
Message-Id: <5jrdff$sak$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Bruce Atherton
<bruce@flair.law.ubc.ca>],
who wrote in article <5jr9pa$3j5$1@nntp.ucs.ubc.ca>:
> In article <5jr4kp$l2v$1@mathserv.mps.ohio-state.edu>, 
> ilya@math.ohio-state.edu (Ilya Zakharevich) wrote:
> >> Ran this program:
> >>       $res = `echo hello there`;
> >>       print("Result = $res .\n");
> >> 
> >> Got this result:
> >>       Result =  .
> >
> >Did you set -w flag when running it?
> 
> Yes, I tried that.  The only message concerned use of unitialized value $res 
> in the print statement.
> 
> I also tried $retval = system "echo test 1 2 3";  It told me it couldn't spawn 
> echo: No such file or directory.  Of course it is internal, so it wouldn't 
> find it.  So I tried calling a program directly and through a batch file.  
> Both times it reported that there wasn't enough memory.  My machine has 48Meg 
> and 555K conventional free.

Under "batch file" you mean, of course, PDKSH's scripts, right?

"Not enough memory" usually means that you have an older version of
EMX.  emxrev should print numbers in range of 51-52 (if I remember
correct).  And if you want to use pipes, you may need RSX instead.

Btw, all this stinks of 5.003_05 and misinstalled PDKSH, I think the
latest 5.003_93 should behave differently.  BTW, apparently the
current decision of Perl to remain silent if shell is not found and -w
is not set looks badly thought out...

Ilya



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

Date: Fri, 25 Apr 1997 20:28:42 GMT
From: eduard.laera@munich.netsurf.de (TwoFlower iN dA HoUZe)
Subject: Ftp. nntp, http how to access the protocols with a perl script
Message-Id: <3361120f.2193931@news.munich.netsurf.de>

	
	
	Hi PerGurus,


i want to write a per script, 
with which I could access news, ftp, or http server,
and send and recieve data, e.g. for testing.

Please reply via email because i4m not always
checking this site.

tnx

Ed

            ###                             ###
            ###  Does a falling tree,       ###
            ###  in a forest were noone is, ###
            ###  any sound ?                ###
            ###                             ###


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

Date: 25 Apr 1997 21:20:42 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Ftp. nntp, http how to access the protocols with a perl script
Message-Id: <5jr77a$lae@fridge-nf0.shore.net>

TwoFlower iN dA HoUZe (eduard.laera@munich.netsurf.de) wrote:

[PLEASE TAKE comp.lang.perl OUT OF YOUR HEADERS]

: i want to write a per script, 
: with which I could access news, ftp, or http server,
: and send and recieve data, e.g. for testing.

Good.  You'll find much content with the News::NNTPClient, Net::FTP,
and LWP modules, grasshopper.  :-)

http://www.perl.com/CPAN/modules/by-module/

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 25 Apr 1997 20:24:06 GMT
From: lusol@turkey.cc.Lehigh.EDU
Subject: Re: Help with Filehandles
Message-Id: <5jr3t6$i1m@fidoii.cc.Lehigh.EDU>


     Gregory Tucker-Kellogg <gtk@walsh2.med.harvard.edu> wrote in article <w2u3ky7tbp.fsf@walsh2.med.harvard.edu> :
>
>
>[ Posted and mailed ]
>
>Russ Allbery <rra@stanford.edu> writes:
>> 
>> [ Posted and mailed. ]
>> 
>> Philip Tanner <ptanner@doom.sw.stratus.com> writes:
>> 
>> > I'd like to use the filehandle somehow to pass the filename to diff, but
>> > am having problems doing that. I've declared diff with the use Shell
>> > directive, but no matter how I pass the filehandle, it doesn't work.
>> 
>> > I'd rather not have to hardwire the filename to a variable as it could
>> > be either one of two names, and given the filehandle is already set to
>> > the correct names(s), it makes sense to use it. Does anyone know what I
>> > need to do to get this to work?
>> 
>> diff needs the filename as a string, and file handles don't know their
>> associated name.  You'll have to keep track of the name yourself in an
>> additional variable (initialize it when you open the file handle).
>
>I've wondered why the FileHandle and IO:File modules don't provide
>this.  There's no reason I can see why the File *handle* can't be kept
>as a tied scalar, and the file *name* accessed via an object method.

One of the problems is what to do if the file is renamed, or deleted.


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

Date: 25 Apr 1997 17:22:52 GMT
From: John Heidemann <johnh@isi.edu>
Subject: Re: Need source for calling search engines
Message-Id: <5jqp9c$253s@uni.library.ucla.edu>

On Thu, 24 Apr 1997 13:28:17 -0400, "Edward F. Hinton"
<#fmlysoft@smtp.ix.netcom.com> wrote:

>I am looking for any Perl example source code that
>can send a request to any of the popular web search engines and
>can get back the results to then be post-processed
>before presenting a web page of results to a user.

See WWW::Search in CPAN.  It does exactly this task.

   -John Heidemann
   <johnh@isi.edu>


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

Date: Fri, 25 Apr 1997 16:09:14 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: newbie question: no data found?
Message-Id: <qh6rj5.o81.ln@localhost>

John Thomas Mosey (mosey@alpha2.csd.uwm.edu) wrote:

: I am just picking cgi/Perl up. 
            ^^^^^^^     ^^^^^^^

You have to at least buy it dinner first, maybe a movie too.


: I wrote a little test script and eve nthis 
: doesn't work. 


See?  ;-)


: I have an HTML form that posts to this script. I'm told on 
: the HTML end that there is no data. What's wrong withthe script? (PS 
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Other than reinventing the wheel, and being absolutely the most
frequently asked question on c.l.p.m, despite it being a CGI
question, not a Perl question, I see nothing wrong with it.

This wheel is commonly known as CGI.pm. It not only decodes URLs
correctly (yours does not), it also does all kinds of other nifty
CGI stuff, so that you can concentrate on getting your job done
instead of solving problems that have already been solved.


: Permissions are correct)

: John Mosey

: #!/usr/bin/perl
:    print "Content-type: text/html \n\n";

: # Get the input
: read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

: # Split the name-value pairs
: @pairs = split(/&/, $buffer);

: foreach $pair (@pairs) {
:    ($name, $value) = split(/=/, $pair);

:   print $name;
: }


You have not mentioned the server anywhere. As this is what will
run the CGI script, you gotta have one. Do you?


Have you had a look at the Perl FAQ? (of course you have, it is expected
in all Usenet newsgroups that you will try the newsgroups FAQ before
posting the Frequently Asked Question yet again).


Maybe you missed this in part 3:

-----------------------
=head2 Where can I learn about CGI or Web programming in Perl?

For modules, get the CGI or LWP modules from CPAN.  For textbooks,
see the two especially dedicated to web stuff in the question on
books.  For problems and questions related to the web, like "Why
do I get 500 Errors" or "Why doesn't it run from the browser right
when it runs fine on the command line", see these sources:

    The Idiot's Guide to Solving Perl/CGI Problems, by Tom Christiansen
        http://www.perl.com/perl/faq/idiots-guide.html

    Frequently Asked Questions about CGI Programming, by Nick Kew
        ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq
        http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml

    Perl/CGI programming FAQ, by Shishir Gundavaram and Tom Christiansen
        http://www.perl.com/perl/faq/perl-cgi-faq.html

    The WWW Security FAQ, by Lincoln Stein
        http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html

    World Wide Web FAQ, by Thomas Boutell
        http://www.boutell.com/faq/
-----------------------


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 25 Apr 1997 21:02:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Notice to antispammers
Message-Id: <5jr65q$cva$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
:If you are really talking about mail messages, go ahead. It's rude to
:put bogus addresses in mail. But, if you are really talking about 
:USENET messages, then think about it a minute. USENET isn't mail. 

As I read the specs, a bogus From: line requires a real Sender:
line.  You aren't supposed spoof.

:What you will be doing is the spammer's work for them, handing them a
:list of valid addresses on a platter.

Yes, that's right.  I intend to do that.  Stop foisting the spam problem
on others -- it needs to be addressed at the legislative level.  By avoiding
it, you merely delay fixing the problem.    

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
The English have no respect for their language, and will not teach
their children to speak it.
                -- G. B. Shaw


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

Date: 25 Apr 1997 21:14:30 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Notice to antispammers
Message-Id: <5jr6rm$lae@fridge-nf0.shore.net>

John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:

: >I'm personally fond of whois <whatever.com>, where I give the people a
: >"pleasant" phone call and ask them to knock it off.  

: So you will call the administrative contact for a site to complain
: because someone who works there wants to avoid spam? 

Huh?  No - you have it totally backwards.  I'll do a whois on the spammer's 
domain and call the administrative contact.  9/10 times the contact is the 
same one who's involved in the spam (they've generally registered several 
domains).  I won't be unkind until I've established that x company is 
responsible for x spam mailing.

I look at it this way: Junk mail is junk mail.  Whether I've received
a catalog for "Bob's House of Barns" via snail mail or "increase your
sexual stamina" via electronic mail, if I don't want it, they have an
obligation to remove me.  I am particularly vehement about receiving
spam on my work account - no soliciting is no soliciting.

: How about this: don't send mail in reply to USENET posts. Think of it
: this way. If someone had wanted to discuss something with you by mail,
: they wouldn't have posted to USENET, they would have sent you mail. I

If this was the case, newsreaders would never have been built with
the functionality to respond via mail / CC + post.  If someone doesn't
want to be subject to satellite discussions, they shouldn't submit
themselves to a public forum.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 25 Apr 1997 18:01:19 -0500
From: kperrier@starbase.neosoft.com (Kent Perrier)
Subject: Re: Notice to antispammers
Message-Id: <cspvvi3dxc.fsf@starbase.neosoft.com>

In article <199704252202362556716@dialup06.ip.lu> 
domo@tcp.ip.lu (Dominic Dunlop) writes:

>
>You can even do the same thing with Eudora (the Pro version admittedly,
>but Eudora, anyway).  So it ain't hard.  Go on.  Spend a few minutes
>building some filters.

And a few hours downloading the spam.  The magic of procmail is that you 
will never see it if you don't want to.  All of the email I get from
cyberpromo.com, savetrees.com, ispam.net, etc is automagically sent to
/dev/null

Kent
-- 
Kent Perrier           If Bill Clinton is the answer, then it must
kperrier@neosoft.com    have been a really stupid question.
Corporations don't have opinions, people do.  These are mine.
PGP 2.6 Public Key available by request and on key servers
PGP encrypted mail preferred!



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

Date: 25 Apr 1997 22:48:28 +0200
From: Tom Grydeland <tom@geronimo.uit.no>
Subject: Re: Odd array sizing information
Message-Id: <ofbzpumesmb.fsf@geronimo.uit.no>

ebohlman@netcom.com (Eric Bohlman) writes:

> Chipmunk (Ronald.J.Kimball@dartmouth.edu) wrote:
> : Does that mean you'll have to stop using Perl when it supports arrays
> : with
> : complex numbers of elements?
> Logically, a two-dimensional array is equivalent to a one-dimensional 
> array indexed by complex numbers.  Are there any plans to allow 
> subscripting 2-D arrays with polar coordinates in the near future?

What's next?  Fractally-dimensioned arrays?

-- 
//Tom Grydeland <Tom@nospam.eiscat.no>  # delete 'nospam.' for valid address


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

Date: 25 Apr 1997 18:59:05 GMT
From: sugalsd@peak.org (Dan Sugalski)
Subject: Re: Perl for VMS ver5.5
Message-Id: <5jqutp$1vn$1@bashir.peak.org>

William Lam (blam@iddis.com) wrote:
: 
: Hi,
:    I found the VMS perl5 from upenn, but this perl is build on
:    VMS ver6.0 .   We're using VMS version 5.5 here.   Where can
:    I get the perl for the old version of VMS ??

The version on UPenn'll build OK on 5.5. You'll need a C compiler, but 
sinc eyou're on a VAX, you can always grab the VMS version of GCC. (No, I 
don't know off-hand where it lives. Check Alta Vista, I'm sure it's in 
there somewhere)

					Dan


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

Date: 25 Apr 97 17:05:16 GMT
From: "keys101" <keys101@wgn.net>
Subject: PERL to dBase dbf
Message-Id: <01bc519a$63c06d60$5206d5cf@keys101>


Perl surfer,

I have got my PERL script up to the point where the form fill in values are
held by a variable as a line of comma separated text.  I need to pass this
text value from the variable to dBase format output.

Can this be done?

Can you offer these few lines of code or code elements or direct me to a
site that would have an example of PERL script for converting parsed form
fill in data to dBase II or III file format?

Much thanks

Keys101


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

Date: 25 Apr 1997 20:59:00 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Randal Teaching Open Perl Class in NYC/Northern NJ AREA
Message-Id: <5jr5uk$cva$1@csnews.cs.colorado.edu>


In comp.lang.perl.misc, Steve Vanechanos <stevev@dynamicweb.com> writes:

Your newsreader is broken.

--tom

:Content-Type: text/html; charset=iso-8859-1; name="perl_class.html"
:Content-Transfer-Encoding: quoted-printable
:Content-Disposition: inline; filename="perl_class.html"
:Content-Base: "http://www.dynamicweb.com/perl_class.h
:	tml"
:
:<BASE HREF=3D"http://www.dynamicweb.com/perl_class.html">
:
:<html>
:<head>
:	<TITLE>DynamicWeb Enterprises, Inc.</TITLE> =
:
:</head>
:<body BACKGROUND=3D"/images/background4.gif">
:<center>
:	<DT><IMG SRC=3D"/images/upcoming_banner.gif">&nbsp;</DT>
:</center>
:<br>
:<table WIDTH=3D"100%"  border=3D0>
:<tr>
:	<TD width=3D 22%>
:		<DT><IMG SRC=3D"/images/dweb_text.gif"></DT>
:	</TD>
:	<TD bgcolor=3D#ffffff>
:  	    <center>
:		<h2> <i>
:			DynamicWeb Sponsors Advanced Perl Seminar<br>
:			Taught by Randal Schwartz<br>
:			May 15, 1997
:			</i>
:		</h2><br>
:		<h3>
:			LIMITED SEATING! =
:
:			<a href=3D#Register>REGISTER NOW!</a>
:		</h3>
:		<h4> <i>
:			(Seminar includes continental breakfast and lunch)
:			</i>
:			<br><a href=3D#Register>Location, Information and Directions</a>
:		</h4>
:	    </center>
:	</td>
:</tr>
:<tr>
:	<td width=3D 22%>
:		&nbsp
:	</td>
:	<td bgcolor=3D#ffffff>
:<hr size=3D3 width=3D95% align=3Dcenter noshade>
:<blockquote>
:<center>
:<table>
: <tr> =
:
:      <td colspan=3D2>
:       <font size=3D"+2">Building Internet Applications with perl</font>
:      </td>
: </tr>
: <tr valign=3Dtop>
:      <td align=3Dright> <b>LEVEL:</b> </td>
:      <td align=3Dleft>  Advanced </td>
: </tr>
: <tr valign=3Dtop>
:      <td align=3Dright> <b>DURATION:</b> </td>
:      <td align=3Dleft>  1 day </td>
: </tr>
: <tr valign=3Dtop>
:      <td align=3Dright> <b>FORMAT:</b> </td>
:      <td align=3Dleft>  Lecture, Overheads and Discussion. </td>
: </tr>
: <tr valign=3Dtop>
:      <td align=3Dright> <b>PREREQUISITES:</b> </td>
:      <td align=3Dleft>  Programming with perl in a Unix environment or e=
:quivalent experience . Some knowledge of object-oriented design methodolo=
:gies. </td>
: </tr>
: <tr valign=3Dtop>
:      <td align=3Dright> <b>WHAT WILL BE COVERED:</b></td>
:      <td align=3Dleft>
:		<ul>
:			<li>Packages
:			<li>References
:			<li>Objects
:			<li>Modules
:		</ul>
:	</td>
: </tr>
:</table>
:</center>
:</blockquote>
:<hr size=3D3 width=3D95% align=3Dcenter noshade>
:
:<b>Who Should Attend</b><br>
:
:Experienced programmers interested in internet application development us=
:ing the perl language.
:<br>
:
:<br><b>Seminar Fee</b><br>
:
:$195 - includes full-day seminar, continental breakfast and lunch<br><br>=
:
:
:	</td>
:</tr>
:<tr>
:	<td width=3D 22%>
:		&nbsp
:	</td>
:	<td bgcolor=3D#ffffff>
:
:		<b>About Randal Schwartz</b>
:
:Randal Schwartz is the author of <i>Learning Perl</i> and the co-author o=
:f <i>Programming Perl</i> -- the definitive works on the hugely popular p=
:rogramming language which underlies much of the World Wide Web.  He also =
:moderates the Usenet newsgroup comp.lang.perl.announce.
:<p>
:Schwartz is an entrepreneur whose expertise include software design, tech=
:nical writing and training, system administration, security consultation =
:and video production.  He is known internationally for his prolific, humo=
:rous and occassionally incorrect postings on Usenet -- especially his "Ju=
:st Another Perl Hacker" sign offs in comp.lang.perl.
:<p>
:Schwartz honed his many crafts through seven years of employment at Tektr=
:onix, ServioLogic and Sequent.  Since 1985, he has owned and operated Sto=
:nehenge Consulting Services in his home town of Portland, Oregon.
:<p>
:
:	</td>
:</tr>
:<tr>
:	<td width=3D 22%>
:		&nbsp
:	</td>
:	<td bgcolor=3D#ffffff>
:
:<a name=3D"Register"> <b>More Information</b> </a>
:
:For more information or an application to attend the seminar, please call=
: Penny Wilson at 201-244-1000 or e-mail <a href=3D "mailto: penny@dynamic=
:web.com">penny@dynamicweb.com.</a>
:<br><br><br>
:
:	</td>
:</tr>
:</table>
:
:<table width=3D 100% border=3D0>
:<tr>	=
:
:	<td width=3D 22%></td>
:	<td bgcolor=3D #ffffff>
:
:<hr size=3D3 width=3D95% align=3Dcenter noshade>
:<b>Seminar Location</b><br>
:
:Ramada Inn
:38 Two Bridges Road (entrance also on Route 46 West)<br>
:Fairfield, New Jersey 07004<br>
:201-575-1742<br><br>
:<img src=3D "/images/ramada_map1.jpg" align=3D right  hspace=3D10 vspace=3D=
: 20>
:<h5>
:	Travel Directions to<br>
:	<font color=3D #ff0000>Ramada Inn</font><br>
:	Fairfield, New Jersey
:	<hr>
:	<font color=3D #4169e1>FROM NEW YORK CITY</font>
:</h5>
:<font size=3D -2><b>Lincoln Tunnel</b> to Route 3 West to Route 46 West, =
:approximately 5 miles - hotel entrance on right.<br><br>
:<b>George Washington Bridge</b> to Route 80 West to Exit 52.  Right hand =
:turn - under bridge - we are on left hand side of Two Bridges Road.</font=
:>
:
:<h5><font color=3D #4169e1>FROM PENNSYLVANIA</font></h5>
:<font size=3D -2>Travelling East on Route 80 - Exit at Pine Brook 47B (si=
:gn reads Montclair, The Caldwells, and Route 46) - take Route 46 to Passa=
:ic Avenue and The Caldwells - at T junction make left over bridge, procee=
:d about 500 yards - we are on riight hand side of Two Bridges Road</font>=
:
:<h5><font color=3D #4169e1>FROM NEWARK AIRPORT</font></h5>
:<font size=3D -2>New Jersey Turnpike North to Exit 16W (Route 3 West).  R=
:oute 3 West to Route 46 West.  Route 46 West, approximately 5 miles - hot=
:el entrance on right - <b>OR</b><br>Route 78 West to Garden State Parkway=
: North to Exit 153B - down ramp to Route 3 West, 5 miles - hotel on right=
:=2E</font><br><br>
:
:<br><br><br></td></tr><tr><td></td><td><center><a href=3D "index.html"><i=
:mg src=3D "/images/textandlogo.jpg" border=3D 0></center><tr><td><br><br>=
:</td><td><br><br><h5><center><a href=3D "index.html">Home</a> | <a href=3D=
: "http://dynamicweb.com/dw_about.html">Who is DynamicWeb?</a> | <a href=3D=
: "http://dynamicweb.com/contact_us.html">Contact Us</a> | <a href=3D "htt=
:p://dynamicweb.com/frontend.html">Products and Services</a><br> <a href=3D=
: "http://dynamicweb.com/dw_press.html">DynamicWeb Press Gallery</a> | <a =
:href=3D "http://dynamicweb.com/newfaq.html">FAQ's</a> | <a href=3D "http:=
://dynamicweb.com/employment.html">Employment Opportunities</a></center><b=
:r><br><br></td></tr><tr><td></td><td><center><h5>Copyright 1997, DynamicW=
:eb&#153; Enterprises, Inc.<br>                      Comments to <a href=3D=
: "mailto: webmaster@dynamicweb.com">webmaster@dynamicweb.com</a><br>     =
:                 Latest Update : Tue Apr 22, 1997 09:08:08 EDT</h5></cent=
:er></td></tr> </table><DT>&nbsp;</DT></BODY></HTML>
:
:--------------74823421E08--
:
:


-- 
	Tom Christiansen	tchrist@jhereg.perl.com

Heavy, adj.:
        Seduced by the chocolate side of the force.


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

Date: Fri, 25 Apr 1997 19:38:30 +0100
From: Steve Vanechanos <stevev@dynamicweb.com>
Subject: Re: Randal Teaching Open Perl Class in NYC/Northern NJ AREA
Message-Id: <3360FA26.6C76@dynamicweb.com>

Tom Christiansen wrote:
> 
> In comp.lang.perl.misc, Steve Vanechanos <stevev@dynamicweb.com> writes:
> 
> Your newsreader is broken.
> 
> --tom
> 
Thanks Tom!

I tried to get Randal to do this so I wouldn't embarrass myself.  He was
to busy so he said not to worry just do it yourself.

You're looking at the result ... I promise to try harder next time (to
get Randal to do it)



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

Date: Fri, 25 Apr 1997 17:37:42 -0400
From: Keith Arner <kraven@keystone.westminster.edu>
Subject: References in foreach loop variable
Message-Id: <33612426.E63@keystone.westminster.edu>

I wrote the following code:

foreach $$i (1..3) {
    print $$i;
}

But when I tried to run it, perl complained:
Can't use an undefined value as a symbol reference at - line 1.

So I wrote:

$i = \$foo;
foreach $$i (1..3) {
    print $$i;
}

And when I tried to run this, perl complained:
Not a GLOB reference at - line 2.

I finally tried:

$i = 'foo';
foreach $$i (1..3) {
    print $i;
}

This gave me what I had expected in the first place.  I understand (sort
of) why the first attempt failed, and why the third attempt was
successful, but can't figure out why the second attempt failed.

--
|/            /|            Keith.Arner@Industry.Net
|\ e i t h   /-| r n e r           
                                  @________________
                 When all else fails, duct tape it.|
                       ----------------------------'


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

Date: 25 Apr 1997 21:04:50 GMT
From: "Steve Sloan" <stvsloan@longbow.com>
Subject: Substitute File Path For URL
Message-Id: <01bc51bb$fc148a30$3b7e99ce@meathead>

I'm attempting to get a HTTP_REFERER file name and change it to the actual
file name needed for reading.  I can hardcode the URL and the path, i.e.
'http://www.longbow.com/" will always be the URL path, and the file path
(from my cgi bin directory) will always be "../html/"

I'm trying to do this:

$urlPath = "http://www.longbow.com/";
$filePath = "../html/";

$fn = $ENV{'HTTP_REFERER'}; #returns "http://www.longbow.com/filename.html"
($fn = $fn) =~ tr/$urlPath/$filePath/; #want to return
"../html/filename.html"

Why is this not working?

TIA to any and all.






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

Date: 25 Apr 1997 22:55:24 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Substitute File Path For URL
Message-Id: <5jrcos$pne@pirate.shu.edu>

Hello -

"Steve Sloan" <stvsloan@longbow.com> writes:

>I'm attempting to get a HTTP_REFERER file name and change it to the actual
>file name needed for reading.  I can hardcode the URL and the path, i.e.
>'http://www.longbow.com/" will always be the URL path, and the file path
>(from my cgi bin directory) will always be "../html/"

>I'm trying to do this:

>$urlPath = "http://www.longbow.com/";
>$filePath = "../html/";

>$fn = $ENV{'HTTP_REFERER'}; #returns "http://www.longbow.com/filename.html"
>($fn = $fn) =~ tr/$urlPath/$filePath/; #want to return
>"../html/filename.html"

>Why is this not working?

It is - it just isn't doing what you want :-)

Use the s/// (substitution) operator:

$fn =~ s/$urlPath/$filePath/;

(Note that you don't have to assign the variable to itself - the
substitution is done "in place".)

David Black
dblack@icarus.shu.edu


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

Date: Fri, 25 Apr 1997 17:14:28 -0500
From: Mark Bracey <mbracey@interaccess.com>
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <33612CC3.3B19@interaccess.com>

Santiago Mediodia wrote:
> 
> Da Borg <vla_di_mip@uniserve.com> escrituras: > [.............]
> > > >       My company is planning to start a project.  We have a big question
> > > > about our investments.  We don't know if we should use Microsoft
> > > > compiler or Borland.  Some myth we heard over the net.
> > > >
> > > > 1) 90% of the programmer uses Microsoft Compiler.
> > > > 2) Borland will vanish in 2 years (NASDAQ:BORL)
> > > > 3) Borland has better compiler
> > > > 4) 99% of the College in US have/use Borland Compiler.
> > > >
> > > > Some one show us the way?
> >
> I cant understand why is people still using Microsoft or Borland to
> make projects. Just, if I see the size of an integer in my Pentium with
> Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
> the size of the data bus? Something is wrong 'cause Linux gives me 4 bytes
> so 32 bits, and thats really the size of the data bus in a Pentium...
> 
> Another one, Borland gives me restrictions when i ask for memory. Only 64
> k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter
> 

These things you are saying are true, if in fact you are living in
1992.


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

Date: 25 Apr 1997 21:18:24 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: undump revisited?
Message-Id: <5jr730$lae@fridge-nf0.shore.net>

Roger Smith (rsmith@proteus.arc.nasa.gov) wrote:

: I am looking for a good way to distribute a highly secure set of perl
: modules to over 3000 sites. Obviously, sending source code in the clear
: with embedded passwords, etc., is not the way to do it. There is also no
: gurantee that every remote site will have the perl interpreter
: installed.

Sounds like security-through-obscurity.  undump is not what you want.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 25 Apr 1997 21:11:24 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: undump revisited?
Message-Id: <5jr6ls$cva$4@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Roger Smith <rsmith@proteus.arc.nasa.gov> writes:
:Hi All
:
:I am looking for a good way to distribute a highly secure set of perl
:modules to over 3000 sites. Obviously, sending source code in the clear
:with embedded passwords, etc., is not the way to do it. There is also no
:gurantee that every remote site will have the perl interpreter
:installed.

Give up.  And I can crack your passwds even if they're in a binary.
I can get a core dump of the running binary, or use ptrace(), or many
other things.

Source code is good for the soul.  If your security model requires
that source be protected, something's wrong with your model, because
that's security through obscurity.

Think of it this way: if all perl programs were distributed in a 
you-can't-see-em fashion, you'd never have learned perl in the 
first place.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


At MIT the server is the unit of invention.  --Rob Pike


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

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 374
*************************************

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