[8582] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2199 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 28 11:07:51 1998

Date: Sat, 28 Mar 98 08:00:44 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 28 Mar 1998     Volume: 8 Number: 2199

Today's topics:
    Re: /URGENT/ Problems w/ PERL for IIS 4.0 <trid@we.be.catchin.spamz.at.primenet.com>
        Annoucement (was Re: Calling all Newbies) <webmaster@fccjmail.fccj.cc.fl.us>
    Re: caller(), $wantarray, and void context <merlyn@stonehenge.com>
        Can you get directory info?? <mark@imp.net>
    Re: Copy file command. <zenin@archive.rhps.org>
    Re: Copy file command. (Nathan V. Patwardhan)
        Get a URL? (Charles Packer)
    Re: Get a URL? <fp@pmpcs.com>
        gethostbyaddr <mdmiller@onramp.net>
        getting a URL and Reading across the web <wbal@msn.com>
    Re: getting a URL and Reading across the web <fp@pmpcs.com>
    Re: getting a URL and Reading across the web <webmaster@fccjmail.fccj.cc.fl.us>
        HELP - Perl 5 on NT Server 4.0 and IIS <ricke@qlo.com>
        London.pm (Dave Cross)
    Re: Need expl.&help! :) <rjk@coos.dartmouth.edu>
    Re: Need sorting routine in Perl (Michael J Gebis)
        Null Strings vs. 0 Integer Values (James Watson)
    Re: Null Strings vs. 0 Integer Values <webmaster@fccjmail.fccj.cc.fl.us>
    Re: Odd-Numbered Array to Hash <dformosa@st.nepean.uws.edu.au>
        Perl & ODBC ? <spittet@bluewin.ch>
    Re: Posting to UseNet groups from Perl? <trid@we.be.catchin.spamz.at.primenet.com>
    Re: PROPOSAL: The Perl Dictionary <webmaster@fccjmail.fccj.cc.fl.us>
    Re: proposal: while $line (<FILE>) (Mike Stok)
    Re: proposal: while $line (<FILE>) <webmaster@fccjmail.fccj.cc.fl.us>
    Re: rant: illiterate Perl programmers (Kyler Laird)
        reading across the web (Kevin Cook)
    Re: reading across the web <webmaster@fccjmail.fccj.cc.fl.us>
    Re: returning immediately from system call? <trid@we.be.catchin.spamz.at.primenet.com>
    Re: returning immediately from system call? <zenin@archive.rhps.org>
        SAVING form result instead of display???? jfk@servteh.com
    Re: ts: why have "push" and "unshift"? (Bart Lateur)
    Re: Unlink on WinNT/95 <karld@feklore.demon.co.uk>
    Re: Unlink on WinNT/95 <karld@feklore.demon.co.uk>
        Using Perl with Win 95 jekronenfeld@havenet.com
    Re: verifying email address -- how? (Abigail)
    Re: verifying email address -- how? (David Oswald)
        What does -f do? <mhanson@arrowweb.com>
        What does this one liner do? <mhanson@arrowweb.com>
        Win32 Peculiars. . .Loop not working like I want! <troy.c@scsi-online.net>
    Re: Win32 Perl, Java Web Server, NT <nospam@ARCO.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 28 Mar 1998 02:32:01 -0700
From: Todd Santos <trid@we.be.catchin.spamz.at.primenet.com>
Subject: Re: /URGENT/ Problems w/ PERL for IIS 4.0
Message-Id: <6fig2h$kp6@nntp02.primenet.com>

it's the server's job to execute the cgi, the client has nothing to do with it.

Chuang Keng Chee <ckengche@dso.org.sg> writes:
: that worked on IIS3.0 to work on IIS4.0.  The error message I get now is :
: Website
: Found.  Waiting for reply. !!

run your cgi scripts before you make 'em cgi scripts.

: P.S.  Anyone ever encountered this :  The IE4.01 browser prompting the user
: where
:         he wants to save a Perl script CGI instead of telling the web server
: to execute it ?

# [Apache]
# make scripts in /usr/local/etc/httpd/html/cgi-bin executable
ScriptAlias /cgi-bin /usr/local/etc/httpd/html/cgi-bin

-- 
I ran out of ideas for sigs.
This is sig number 4.


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

Date: Sat, 28 Mar 1998 14:08:59 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Annoucement (was Re: Calling all Newbies)
Message-Id: <351D0313.F4FC1023@fccjmail.fccj.cc.fl.us>

Chris Vogel wrote:

> So please, people learning perl out there and feeling alone with all
> the books and documentation, go ahead and try to find a way to build
> something like a virtual study group or maybe - in far future - a
> virtual perl university.
>
> Chris - a sometimes lonesome perl learner.

Perl-blic Notice:

I am in the process of obtaining authorization to open some type of real-time
chat system on one of the servers here at FCCJ.  Also, I am working on getting
an AutoFaq and/or Perl-only news server working where Perl newbies can harrass
each other and leave the "Perl Founding Fathers & Mothers" in peace. Although,
if those gurus/wizards/etc who post here would like to hang out there, you're
more than welcome :-)

HOWEVER - Please do not bang on my firewall - not yet. I am seeking management
authorization and inquiring regarding interest here in this newsgroup.  All
interested should reply to this posting via e-mail in PRIVATE.  If I get
approval, there will be a roll-out process announced here...

Thx,
Sneex :-)



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

Date: 28 Mar 1998 02:25:05 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: ken@forum.swarthmore.edu
Subject: Re: caller(), $wantarray, and void context
Message-Id: <8c7m5f5fri.fsf@gadget.cscaper.com>

>>>>> "ken" == ken  <ken@forum.swarthmore.edu> writes:

ken> I noticed something interesting.  If I do @list = caller(0),
ken> $list[5] is supposed to tell me whether my function is called in
ken> a list or scalar context, much like the wantarray() function.
ken> The interesting part is that $list[5] is 0 in a scalar context, 1
ken> in a list context, and '' in a void context.  That means that
ken> caller(0) can be used to tell the difference between a scalar
ken> context and a void context.

ken> My question is, is this behaviour guaranteed in all versions of
ken> perl after some specific version?  Or is it just some handy quirk
ken> of my version (5.004_04)?

Well, gee, I wonder what the docs might have to say about this.
For caller(), we see:

             With EXPR, it returns some extra information that
             the debugger uses to print a stack trace.  The value
             of EXPR indicates how many call frames to go back
             before the current one.

                 ($package, $filename, $line, $subroutine,
                  $hasargs, $wantarray, $evaltext, $is_require) = caller($i);

And there's that $wantarray arg you are talking about.  Since it is
not defined near that paragraph, I'd presume we go to wantarray(),
which looks like:

     wantarray
             Returns TRUE if the context of the currently
             executing subroutine is looking for a list value.
             Returns FALSE if the context is looking for a
             scalar.  Returns the undefined value if the context
             is looking for no value (void context).

Yup.  Looks like it is documented behavior alright.

Sometimes, those docs DO come in HANDY, eh?

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 157 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Sat, 28 Mar 1998 10:16:51 -0500
From: "Mark Polakow" <mark@imp.net>
Subject: Can you get directory info??
Message-Id: <6fj5b8$f11$1@viper.america.net>

I haven't found any perl statements that would list information about a
directory? I am writing a file management scrip and would like to return
something if a directory is empty - ideally I would like to be able to list
the size of the directory too? CAn anyone help me with this?




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

Date: 28 Mar 1998 06:42:43 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Copy file command.
Message-Id: <891067771.698733@thrush.omix.com>

Nathan V. Patwardhan <nvp@shore.net> wrote:
: The $600 that you might spend is well worth having a
: full, BSD 4.3-based system with mostly non-broken features around.[1]

	You can buy a decent and more powerful x86 based system for that
	kind of money.  Stick FreeBSD on it an you'll get a much better
	BSD4.4 lite based system. :-)

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 28 Mar 1998 14:53:29 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Copy file command.
Message-Id: <6fj2t9$ok6@fridge.shore.net>

Zenin (zenin@archive.rhps.org) wrote:

: 	You can buy a decent and more powerful x86 based system for that
: 	kind of money.  Stick FreeBSD on it an you'll get a much better
: 	BSD4.4 lite based system. :-)

"My other machine runs 2.2.6-RELEASE..."  :-)  Seriously, I run
FreeBSD for my server, and NextSTEP on my other machine, a 33mHz color
slab.  NextSTEP is really neat *but not as cool as FreeBSD*.  Haven't
you tried it?

--
Nathan V. Patwardhan
please don't send spam to president@whitehouse.gov


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

Date: 28 Mar 1998 14:51:11 GMT
From: packer@shell.clark.net (Charles Packer)
Subject: Get a URL?
Message-Id: <slrn6hq3iv.md6.packer@shell.clark.net>

I need a means of downloading a Web page from a Perl script.
The Web pages I'm interested in downloading require username
and password for access, so I need to be able to pass them
along as parameters. Any such animal out there?

-- 
packer@clark.net
http://www.clark.net/pub/whatnews/whatnews.html


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

Date: Sat, 28 Mar 1998 10:40:39 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: Get a URL?
Message-Id: <6fj5gq$26p$1@usenet36.supernews.com>

Greetings:

Charles Packer wrote in message ...
>I need a means of downloading a Web page from a Perl script.
>The Web pages I'm interested in downloading require username
>and password for access, so I need to be able to pass them
>along as parameters. Any such animal out there?

Look at the LWP modules (http://www.perl.com/CPAN-local//CPAN.html#lwp).

Also see...

http://www.linpro.no/lwp/
http://www.perl.com/CPAN-local/doc/wwwman/libwww/lib/LWP.html
http://www.findmail.com/listsaver/libwww-perl/thread.html

The book, "Web Client Programming with Perl" also covers the LWP module (to
a degree).

--
===========================================================
Peter Perchansky,  Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, &  Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm





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

Date: Sat, 28 Mar 1998 00:09:38 -0600
From: Mark Miller <mdmiller@onramp.net>
Subject: gethostbyaddr
Message-Id: <351C9422.5D39BD4C@onramp.net>

Well I've looked around and I can't figgure this out. I'm using the
basic client found in O'Reilly "Programming Perl" (aka the camel book).
It is setup to use the gethostbyname but as far as I can tell that needs

a entry in the hosts file.  I want to be able to use ip/domain name but
I can't figgure out exactly what I need to be doing. I've tried using
gethostbyaddr but I don't know what to put in for the addrtype. Any help

will be appreciated. Thanks





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

Date: 28 Mar 1998 15:22:47 GMT
From: "Kevin Cook - Home" <wbal@msn.com>
Subject: getting a URL and Reading across the web
Message-Id: <01bd5a5d$96da7700$f5128fa8@me.clark.net>

It appears as though I (kevin Cook) and charles packer have the same
(similar) question...



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

Date: Sat, 28 Mar 1998 10:44:39 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: getting a URL and Reading across the web
Message-Id: <6fj615$k88$1@usenet46.supernews.com>

Greetings:

Kevin Cook - Home wrote in message
<01bd5a5d$96da7700$f5128fa8@me.clark.net>...
>It appears as though I (kevin Cook) and charles packer have the same
>(similar) question...

Look at the LWP modules (http://www.perl.com/CPAN-local//CPAN.html#lwp).

Also see...

http://www.linpro.no/lwp/
http://www.perl.com/CPAN-local/doc/wwwman/libwww/lib/LWP.html
http://www.findmail.com/listsaver/libwww-perl/thread.html

The book, "Web Client Programming with Perl" also covers the LWP module (to
a degree).

--
===========================================================
Peter Perchansky,  Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, &  Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm





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

Date: Sat, 28 Mar 1998 15:55:04 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: getting a URL and Reading across the web
Message-Id: <351D1BF2.45C946F0@fccjmail.fccj.cc.fl.us>

Kevin Cook - Home wrote:

> It appears as though I (kevin Cook) and charles packer have the same
> (similar) question...

  That happens a lot around here.  I have only been a regular reader for
a few months, but I have seen the same questions questioned and answered
over and over and over...

:-)  No wonder people's eyes bug out...
Sneex



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

Date: Sat, 28 Mar 1998 01:08:50 -0600
From: Rick Edwards <ricke@qlo.com>
Subject: HELP - Perl 5 on NT Server 4.0 and IIS
Message-Id: <351CA202.C17DFB16@sk.sympatico.ca>

Man, give me UNIX anyday.  I  have PERL installed in c:\perl, I have
".pl" associated with c:\perl\bin\perl.exe, I made the change in my
Registry, I have an Application mapping in my Web Site properties, my
cgi-bin directory has "Script" permissions, and my tongue is in the
proper position, out the left side of my mouth.

My scripts work *fine* from the command line, but when I try to access
them with the browser, NADA.  They eventually  just time out - no
errors, just timeout.

I'm sure that it's *just* a configuration gotcha, but danged if I can
find it.

Any ideas out there??

TIA,
Rick
ricke@sk.sympatico.ca



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

Date: Sat, 28 Mar 1998 14:30:06 GMT
From: dave@mag-sol.com (Dave Cross)
Subject: London.pm
Message-Id: <351f0966.3749808@news.demon.co.uk>


I've seen a few posts here recently talking about various Perl
M[ou]ngers groups in the US, but nothing about the UK. I visited
www.pm.org to see if anyone else had registered an interest, but the
search facility had been switched off.

Has anyone given any thought to starting a London.pm or UK.pm group?
If not, I'd like to volunteer to get the ball rolling. Is there anyone
else that would be interested in getting involved? Would any of the US
Perl gurus be interested in coming over and speaking at a meeting in
London?

I really don't know how popular Perl is in the UK, so this is all very
experimental...

Hoping to hear from some UK-based Perl M[ou]ngers.

Dave... .. .

dave@cool-stuff.co.uk
'...but Man created all gods equal.'


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

Date: Sat, 28 Mar 1998 01:43:18 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: Need expl.&help! :)
Message-Id: <351C9C0A.9B748C90@coos.dartmouth.edu>

Belle wrote:
> 
> How  i get  string length, like a Pascal function : Length(S :String) :
> integer ...??

Wow, it's been awhile since I last answered this question.  Let's see what I
can come up with this time...

$i = 0;
($temp = $string) =~ s/./$i = 0 if ++$i > 9; $i/gse;
$length = ((split(//, $temp))[-1] || 0) + (10 * $temp =~ tr/0//);

Creativity reigns again!

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 28 Mar 1998 07:16:45 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Need sorting routine in Perl
Message-Id: <6fi84t$2mg@mozo.cc.purdue.edu>

smcdow@arlut.utexas.edu (Stuart McDow) writes:

}gebis@albrecht.ecn.purdue.edu (Michael J Gebis) writes:
}> 
}> sub fast_sort {

}   sort { $a <=> $b } @_;
You really didn't even try my program, did you?

I mean, come on,your sort doesn't even use "rand" anywhere.  Please. 

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Sat, 28 Mar 1998 03:52:19 GMT
From: james_vs_watson@yahoo.com (James Watson)
Subject: Null Strings vs. 0 Integer Values
Message-Id: <351c7276.100386937@news.erols.com>

Is there a way to examine a variable to figure out if it is a null
string?
I have some string variables and also some number variables and I want
to make sure that the string variables have some sort of value other
than null.  But I do not want my program to think that a value is the
null string when it is actually the number zero.
Right now I am using a hash in an each loop and I am not sure what to
compare the value fields to in order to separate null strings from
zero-value integers.
Thank you in advance.


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

Date: Sat, 28 Mar 1998 15:47:00 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Null Strings vs. 0 Integer Values
Message-Id: <351D1A0D.3E487D95@fccjmail.fccj.cc.fl.us>

James Watson wrote:

> Is there a way to examine a variable to figure out if it is a null
> string?
> Thank you in advance.

  I believe you want to do
$value == 0    or
$vlue eq '0'     versus
if ($value eq null)  ???

Curious,
Sneex :-)



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

Date: 28 Mar 1998 10:18:46 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Odd-Numbered Array to Hash
Message-Id: <891080326.921276@cabal>

In <351b54f4.1517028@news.tornado.be> bart.mediamind@tornado.be (Bart Lateur) writes:

>Ronald J Kimball wrote:

>		my ($key,$value) = split /:/;
>		$data{$key} = $value;

I keep feeling that the above is very unperlish.  Something so often used
and idomatic should be squeesed onto one line.  Can anybody suggest a
better way of doing it?


--
I'm a perl programer if you need perl programing hire me. Bye easter bilbies.
Please excuse my spelling as I suffer from agraphia see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html  http://www.cm.org/ 
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Sat, 28 Mar 1998 15:06:51 +0100
From: Pittet Sibastien <spittet@bluewin.ch>
Subject: Perl & ODBC ?
Message-Id: <351D03FB.27F0@bluewin.ch>

Hello all !

I'm a beginner in programming in Perl. I ave to do a work which consist
in :
 * Make dynamic HTML pages
 * Use an Access 97 file (mdb) on NT SERVER

But, i know nothing in Perl. I'm looking for a list of software I need
to make CGI's scripts.

I've a PC with an NT 4 Server and the HTTP server from Microsof (IIS).

Who can give me an URL (or FTP) where I can download things to create
CGIs.

Tkanks a lot to answer on my e-mail : spittet@ThePentagon.com

Sebastien


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

Date: 28 Mar 1998 02:19:01 -0700
From: Todd Santos <trid@we.be.catchin.spamz.at.primenet.com>
Subject: Re: Posting to UseNet groups from Perl?
Message-Id: <6fifa5$k7h@nntp02.primenet.com>

Michael J Gebis <gebis@albrecht.ecn.purdue.edu> writes:

: an intersections.  Telemarketers will be more agressive.  Hanson will
: release another song.  Your cats will get lazier.  You'll never properly

if hanson releases another song, I'm holding him personally responsible.

-- 
go ahead. spam my prez.
president@whitehouse.gov


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

Date: Sat, 28 Mar 1998 15:36:59 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <351D17B5.AADB0CAD@fccjmail.fccj.cc.fl.us>

Ed Finch wrote:

> herl - What a perl hacker does at the thought of using Visual Basic.

  ROTFLOL !



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

Date: 28 Mar 1998 15:36:35 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: proposal: while $line (<FILE>)
Message-Id: <6fj5e3$8p7@news-central.tiac.net>

In article <351C4EB5.FC91A0A8@fccjmail.fccj.cc.fl.us>,
Webmaster  <bill@astro.fccj.cc.fl.us> wrote:
>Mike Stok wrote:
>
>> perl gives you enough rope to hang yourself.  There are plenty of other
>> languages which keep the rope safely locked away...
>>
>> Mike
>
>I never dreamed I would see that comment made about Perl!
>I listened to people say it for years while programming C, but Perl?

Maybe a quick search for

  perl rope hang yourself

on http://www.hotbot.com is in order

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Sat, 28 Mar 1998 15:42:11 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: proposal: while $line (<FILE>)
Message-Id: <351D18EC.70F64BC@fccjmail.fccj.cc.fl.us>

Mike Stok wrote:

> In article <351C4EB5.FC91A0A8@fccjmail.fccj.cc.fl.us>,
> Webmaster  <bill@astro.fccj.cc.fl.us> wrote:
> >Mike Stok wrote:
> >
> >> perl gives you enough rope to hang yourself.  There are plenty of other
> >> languages which keep the rope safely locked away...
> >>
> >> Mike
> >
> >I never dreamed I would see that comment made about Perl!
> >I listened to people say it for years while programming C, but Perl?
>
> Maybe a quick search for
>
>   perl rope hang yourself
>
> on http://www.hotbot.com is in order
>
> Mike
>
> --
> mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
> http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
> http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
> stok@colltech.com                  |            Collective Technologies (work)

  I found -

Returned: 186 matches.
 Breakdown: perl: 681386, rope: 158974, hang: 520175,
 yourself: 1660504

Interesting....
Sneex :-)



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

Date: 28 Mar 1998 14:47:39 GMT
From: laird@dock.ecn.purdue.edu (Kyler Laird)
Subject: Re: rant: illiterate Perl programmers
Message-Id: <6fj2ib$1q2@mozo.cc.purdue.edu>

Hal Snyder <hal@vailsys.com> writes:

>It's not just Perl programmers - "it's"/"its" dyslexia is endemic.

>What's next? Her's and your's?

Too late.  Alta Vista shows 19072 hits for
"her's or your's" and 292 for "(her's or
your's) and perl".  (Of course there are many
false positives in such a search.)

Unfortunately, our universities are teaching
this misuse...

	http://www.cs.byu.edu/courses/cs544/ideas-w97.html

	C.S. 544 - Project Ideas 

	The Course Project provides you with the opportunity
	to select a topic of interest in the field of
	operating systems and spend some significant time on
	it. The choice of topic is your's [...]

If you want more of the sad news, play with
	http://www.ecn.purdue.edu/~laird/Bad/
(Yes, this is an old rant for me.  It appears
that Perl docs are worse than average in this
respect, though.)

As for contributing to the community...I will
send a free Perl programmer's grammar
enhancement device to the first 10 people who
send me their USPS addresses.  (It's hardware.)

--kyler


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

Date: Sat, 28 Mar 1998 14:15:11 GMT
From: kcook@hearst.com (Kevin Cook)
Subject: reading across the web
Message-Id: <6fj0k0$8d4$1@clarknet.clark.net>

I have had lots of luck writing code as long as I don't ever 
leave my local machine.

Now I need to open and read a file that's across the web.

I'm sure it's simple.  Do I use a module? Whuch one? How is it 
called? etc etc etc


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

Date: Sat, 28 Mar 1998 15:50:35 GMT
From: Webmaster <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: reading across the web
Message-Id: <351D1AE4.DCF91C92@fccjmail.fccj.cc.fl.us>

Kevin Cook wrote:

> I have had lots of luck writing code as long as I don't ever
>
> leave my local machine.
>
> Now I need to open and read a file that's across the web.
>
> I'm sure it's simple.  Do I use a module? Whuch one? How is it
>
> called? etc etc etc

  It's possible.  Read on a Sockets, IPC, LWP, etc...
There are plenty of examples at www.perl.com

Enjoy,
Sneex :-)



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

Date: 28 Mar 1998 02:04:00 -0700
From: Todd Santos <trid@we.be.catchin.spamz.at.primenet.com>
Subject: Re: returning immediately from system call?
Message-Id: <6fiee0$jss@nntp02.primenet.com>

Erik Johnson <erik@phidias.colorado.edu> writes:
: I've looked into the FAQ but come up empty handed (perhaps I don't
: know the right question to 'ask'?).

: Is there a way to have perl continue running after making a system
: call to launch another program, without waiting for the other program
: to complete? 

have it fire up a child.

exec( "stuff" ) if( !fork() );

: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
: Erik Johnson    erik@ phidias.colorado.edu
: http://phidias.colorado.edu/ejvgallery
: http://phidias.colorado.edu/phidias

-- 
I ran out of ideas for sigs.
This is sig number 4.


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

Date: 28 Mar 1998 09:55:29 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: returning immediately from system call?
Message-Id: <891079337.364324@thrush.omix.com>

Todd Santos <trid@we.be.catchin.spamz.at.primenet.com> wrote:
: have it fire up a child.
: exec( "stuff" ) if( !fork() );

	Or, just do:

	system ("command &");

	And let perl deal with the child clean up and other mess.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Sat, 28 Mar 1998 10:44:10 -0500
From: jfk@servteh.com
Subject: SAVING form result instead of display????
Message-Id: <MPG.f86e4d2aaac7107989681@news.servtech.com>

How would I get the results of a form to save instead of displaying as 
HTML??  i.e.  How would I direct the results of a search engine to a file 
instead of displaying in a browser????

- JFK


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

Date: Sat, 28 Mar 1998 09:14:02 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: ts: why have "push" and "unshift"?
Message-Id: <351ebd16.1870800@news.tornado.be>

tsatan@hotmail.com wrote:

>Why does perl have the "push" and "unshift" functions?
>Consider an array: @nums = (1, 2, 3);
>Then: push @nums, 4; is the same as @nums= (@nums, 4);
> and: unshift @nums, 0; is the same as @nums= (0, @nums);
>I know perl's motto is "There's more than one way to do it",
>but these two functions seem especially unnecessary.

I wouldn't call them unnecessary. I'd call them "high level". Suppose
you're inspecting code, and one line is:

	@ary = (@ary, $scalar);

You'll probably be baffled for a while. Then you'll think: "Oooh, I get
it, it's a "push". And then you continue with the next statement.

"push" and "unshift", together with "unshift and pop", are idioms, ways
of thinking about certain operations, in this case, related to stacks
and queues.

I think it's nice that Perl allows them directly, instead of the
low-level phrases you're proposing. You're describing HOW to do these
operations, while these keywords say WHAT they do.

	Bart.


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

Date: Sat, 28 Mar 1998 12:28:11 +0000
From: Karl Dyson <karld@feklore.demon.co.uk>
Subject: Re: Unlink on WinNT/95
Message-Id: <dccAjLAbzOH1EwW2@feklore.demon.co.uk>


>>while (-e "counter.lock") { #Use the -e thing to check if the file 
>>                            #exists. Notice the newly added quotes
>>                            #around the filename
>>}
>I hope you weren't planning to use your computer for anything else
>during this time (like let another process finish)?  A sleep() or
>select() within the while loop is more multitasking friendly.
Ooops. Good point. I'll change that to a sleep() then.

Karl
-- 
Karl Dyson <karld@feklore.demon.co.uk>
"A look can be deceiving; a touch can be lethal."


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

Date: Sat, 28 Mar 1998 12:32:20 +0000
From: Karl Dyson <karld@feklore.demon.co.uk>
Subject: Re: Unlink on WinNT/95
Message-Id: <YsPBfPAU3OH1EwV7@feklore.demon.co.uk>


>That isn't the least of the problems. Also since the testing of the
>lock and getting the lock are two separate operations, two processes
>can both think they have they lock. If you can test and create in one
>system call, and if file creation is an atomic operation (probably
>true on a local filesystem on Windows 95, it isn't on NFS
>filesystems.) then you can try to create the file, and if you do so
>successfully, then you have the lock.
Sounds good. But how do I check if a file operation has been succesful?

Like I said, I'm still very new to Perl and the book I've got hasn't
mentioned how to test the sucess of using files.

Karl
-- 
Karl Dyson <karld@feklore.demon.co.uk>
"A look can be deceiving; a touch can be lethal."


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

Date: Sat, 28 Mar 1998 10:07:19 GMT
From: jekronenfeld@havenet.com
Subject: Using Perl with Win 95
Message-Id: <351cc944.49140979@news.havenet.com>

I am trying to learn Perl on my  Windows 97 system.  In particular I
am trying to learn to develop perl script to use with CGI for web
pages.  I can develop perl script and run them in a DOS window under
Windows 97.  I have been able to create an HTM[L] file that trys to
execute the perl script (although not consistently!).  However, the
execution pops up a DOS window, runs the program and then disappears.
I assume that is because I have no local CGI?   Is there a way around
this?  Can anyone tell me how to test perl scripts for a web page
without being connected to a host service provider?
Thanks.


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

Date: 28 Mar 1998 09:07:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: verifying email address -- how?
Message-Id: <6fiela$o2d$1@client2.news.psi.net>

I R A Aggie (fl_aggie@thepentagon.com) wrote on MDCLXX September MCMXCIII
in <URL: news:fl_aggie-2703982327580001@aggie.coaps.fsu.edu>:
++ In article <6qkBAZb1w-B@khms.westfalen.de>,
++ kaih=6qkBAZb1w-B@khms.westfalen.de (Kai Henningsen) wrote:
++ 
++ + jdporter@min.net (John Porter)  wrote on 26.03.98 in <351A690E.7AF9@min.net>:
++ + 
++ + > >  - could the address provided be valid?  by this, i mean - is this a
++ + > >    syntactically valid address?
++ + >
++ + > Impossible.
++ + 
++ + Quite possible.
++ 
++ Ok, SmartGuy. What's the regex that does this?


There isn't any. Just because it's (trivially) solvable doesn't mean
there's a regex. Regexes aren't the ultimate solution engine. Regexes are
limited (though 5.005 will make them better). RFC 822 has a grammar.
In BNF. It wouldn't be hard to translate the BNF into a *parser*.
That is, a state machine, with memory, and transitions.

Syntatical validation is easy. (If you can do it in Basic or TCL, 
you should be able to do it in Perl as well)




Abigail
-- 
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
          print grep {$_{$_}} @_' < /usr/dict/words


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

Date: Sat, 28 Mar 1998 09:45:07 GMT
From: doswald@xmission.com (David Oswald)
Subject: Re: verifying email address -- how?
Message-Id: <351cc459.117927948@news.xmission.com>

On 28 Mar 1998 09:07:54 GMT, abigail@fnx.com (Abigail) wrote:

>I R A Aggie (fl_aggie@thepentagon.com) wrote on MDCLXX September MCMXCIII
>in <URL: news:fl_aggie-2703982327580001@aggie.coaps.fsu.edu>:
>++ In article <6qkBAZb1w-B@khms.westfalen.de>,
>++ kaih=6qkBAZb1w-B@khms.westfalen.de (Kai Henningsen) wrote:
>++ 
>++ + jdporter@min.net (John Porter)  wrote on 26.03.98 in <351A690E.7AF9@min.net>:
>++ + 
>++ + > >  - could the address provided be valid?  by this, i mean - is this a
>++ + > >    syntactically valid address?
>++ + >
>++ + > Impossible.
>++ + 
>++ + Quite possible.
>++ 
>++ Ok, SmartGuy. What's the regex that does this?
>
>
>There isn't any. Just because it's (trivially) solvable doesn't mean
>there's a regex. Regexes aren't the ultimate solution engine. Regexes are
>limited (though 5.005 will make them better). RFC 822 has a grammar.
>In BNF. It wouldn't be hard to translate the BNF into a *parser*.
>That is, a state machine, with memory, and transitions.

I agree with Abigail.

The fact is that the MRE book attempts to show an email address syntax
validity regex, but after creating a regex of over 6000 bytes the
author also admits that his concauction still won't permit nested
comments within the email address (something that is permissible).  He
settles for a 6000+ byte regex that will accept one level of comments
in the address.

He also reminds us that his regex is only (mostly) valid for Internet
email addresses.  It would fail to match a local email address.

Frankly, if the author of Mastering Regular Expressions took over 6000
bytes in a regex that validates only MOST Internet email address
syntax's, I'd say that for anyone with less expertise than him the
project would be futile, and the product would be ill-conceived.

>Syntatical validation is easy. (If you can do it in Basic or TCL, 
>you should be able to do it in Perl as well)

It is a possible task but not with regexes alone, as you pointed out.

Dave


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

Date: Sat, 28 Mar 1998 09:30:24 -0800
From: Mike <mhanson@arrowweb.com>
Subject: What does -f do?
Message-Id: <351D33B0.261B@arrowweb.com>

What does -f do?


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

Date: Sat, 28 Mar 1998 09:31:27 -0800
From: Mike <mhanson@arrowweb.com>
Subject: What does this one liner do?
Message-Id: <351D33EF.5B86@arrowweb.com>

What does this do? select(undef,undef,undef,0.1);


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

Date: Sat, 28 Mar 1998 17:23:38 +0900
From: "Troy Coulombe" <troy.c@scsi-online.net>
Subject: Win32 Peculiars. . .Loop not working like I want!
Message-Id: <6fibjb$kt0$1@news.yokota.attnet.or.jp>

NT 4.0 SP 3 with Gurusamy Sarathy's
distribution of Perl

Okay, I have RTFM, however I would love some
web pointers. In hand is LP. But it seems to be
very UNIX flavored {rightly so}. The loop works,
however I can  not get it to do what I want...

The PROBLEM: It takes a Carriage Return and
matches it to "0".  How do I prevent that? Here
is the very non elegant script.

-=-=-=-=--=
#!/usr/bin/perl  #not needed in NT?
# choices.pl
# troyc@scsi-online.net
@choices=(0,1,2,3);
$true="0";
do {
      print "\nEnter a number: ";
      chomp($num=<stdin>);
      print "\n";
      for ($counter =0; $counter<=$#choices; $counter++)
           { print "\ntrue = $true";
             print "    num = $num";
             print "    counter = $counter\n";
             if ($counter =~ $num)
             { $true="1"}
           }
     } until $true;
$input=<stdin>; # so I can see what's going on...



--
Troy C
Please remove the dot from between the troy and the c
when replying!





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

Date: Wed, 25 Mar 1998 18:19:12 GMT
From: Kevin Hawley <nospam@ARCO.com>
To: Robert Eric Pearse <rpearse@healthway.net>
Subject: Re: Win32 Perl, Java Web Server, NT
Message-Id: <35194A9F.B75708F@ARCO.com>

If you web on over to here:
 http://www.perl.com/CPAN-local/ports/winNT/FAQ/Perl_for_Win32_FAQ.html

all of your questions will be answered.
One of the sections is:
 "Web Server Configuration and Troubleshooting"

Kevin

Robert Eric Pearse wrote:

> Just installed Java Web Server 1.03 on my NT workstation to check it
> out. It came with a few Perl scripts (test, redirect, etc.). However,
> when I access them through a browser, the cgi servlet acts up. I think
> the error is within the script header. On my Solaris account,
> #!/usr/local/bin/perl works (like it should). However, how is the Win32
> Perl interpreter addressed in the script? I just dropped installed it in
> c:\perl, but using that instead of /usr/local/bin/per doesn't work.
> Should I put the perl\bin stuff in bin in the web server directory.
> Anybody have any experience with this? How about using IIS with Win32
> Perl? I guess I need help setting up Win32 Perl. . .
>
> Thanks,
>
> Robert
>
> --
> _______________________________________________________
> Robert Eric Pearse                rpearse@healthway.net
> Internet Developer                www.healthway.net
> Healthway Interactive             512.502.3685





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

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

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