[6907] in Perl-Users-Digest
Perl-Users Digest, Issue: 532 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 28 15:09:41 1997
Date: Wed, 28 May 97 12:00:28 -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 Wed, 28 May 1997 Volume: 8 Number: 532
Today's topics:
Re: /x (Abigail)
Re: 2-way communication with unix command (Jonathan Hudson)
Re: any editor for perl?--any editor written in Perl? <rootbeer@teleport.com>
Re: Any module to get shadow password to work? <madhat@flash.net>
Any non number but not a dot... <christopher@wonderlandinorbit.com>
binary conversions ?? <skraemer@iil.intel.com>
Re: Competent Perl Programmer Needed (O'Shaughnessy Evans)
Re: database record check <rootbeer@teleport.com>
dos, FOSSIL and COM ports (Precision Farming Project)
Re: Error checking with name strings <rootbeer@teleport.com>
FreeNetAccessWorldwid+ (InternetPRO.)
Re: Help Me! (Magnus Bodin)
Help using tes.awk please (TinOmen)
Help with ( <dave_boswell@nt.com>
Re: Help with ( (Tushar Samant)
Re: Help with ( (Quentin Fennessy)
Re: Help with ( <dave_boswell@nt.com>
Re: Help with ( (Tushar Samant)
Re: Help with ( <rootbeer@teleport.com>
Re: Linux issues with 5.004. <rootbeer@teleport.com>
Re: Magical Auto-increment operator <rootbeer@teleport.com>
NcFTP, Perl, CGI - Permission Denied <dkruk@ilos.net>
Re: Open and print HTML file insside CGI script (Magnus Bodin)
Re: Open and print HTML file insside CGI script (Magnus Bodin)
Re: Password Protection - NT <rootbeer@teleport.com>
Re: Perl 5.004 on HP-UX 10.20 (Kerry Schwab)
Re: perl newbie stuck!! <jhi@alpha.hut.fi>
Re: perl newbie stuck!! <rootbeer@teleport.com>
Perl306/ISAPI/socket bug on NT <mallwitz@intershop.de>
Re: Pkgadd version of Perl 5? <vonbrand@inf.utfsm.cl>
Problem with crypt <yvonne@att.com>
Re: Question: Pattern Matching and Counter Variables (Honza Pazdziora)
Re: Question: Pattern Matching and Counter Variables (Tushar Samant)
Re: Question: Pattern Matching and Counter Variables <nnyxcu@ny.ubs.com>
Re: Question: Pattern Matching and Counter Variables <rootbeer@teleport.com>
The CGI & PERL Discussion Forum Here! (TOTO)
Re: Who am I? (I'm a perl script) <rootbeer@teleport.com>
Win32::ODBC - Parse exception <jfarcis@ifhamy.insa-lyon.fr>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 28 May 1997 14:42:17 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: /x
Message-Id: <EAwBIH.FoB@nonexistent.com>
On 27 May 1997 16:22:53 -0700, kendall shaw (kshaw@plight.lbin.com) wrote in
comp.lang.perl.misc
<URL: news:529110ijoy.fsf@plight.lbin.com>:
++ Extended regexps in my perl 5.004 don't seem to woark:
++
++ I'm getting results that I don't expect:
++
++ This:
++
++ $asdf = '<PARA CONTINUE="1" LINE-SPACING="11" PARATYPE="07Body text" >';
++
++ $_ = $asdf;
++
++ s/PARA\ CONTINUE=...\ .*?PARATYPE=(\".*?\")\ */
++ PARA\ CONTINUE=\"1\"\ PARATYPE=$1/x;
++ print $_ unless /PARATYPE FONT-FAMILY/;
++
++ produces:
++
++ <
++ PARA CONTINUE="1" PARATYPE="07Body text">
++
++ But if I remove the newline and space from the right hand side
++ (pretend "\ PARATYPE" is joined with the previous line") :
++
++ s/PARA\ CONTINUE=...\ .*?PARATYPE=(\".*?\")\ */PARA\ CONTINUE=\"1\"
++ \ PARATYPE=$1/x;
++
++ I get what I want:
++
++ <PARA CONTINUE="1" PARATYPE="07Body text">
++
++ Is this a bug?
No, it's outputting exactly what you tell it to do.
The x modifier applies to the match, not to the replacement.
Try:
s/PARA\ CONTINUE=...\ .*?PARATYPE=(".*?")\ *
/PARA CONTINUE="1" PARATYPE=$1/x;
(The difference is that the / is moved down a line.)
BTW, there is no need to escape "'s.
Abigail
--
perl5.004 -wMMath::BigInt -e'$=new Math::BigInt+qq;$$783$[$%9889$47$|88768$596577669$%$5$3364$[$$$|838747$[8889739$%$|$673$%$98$76777$=56;;$=$]*(q.25..($=@))=>do{print+chr$%$;$/=$}while$!=$'
------------------------------
Date: 27 May 1997 17:12:54 GMT
From: Jonathan.Hudson@jrhudson.demon.co.uk (Jonathan Hudson)
Subject: Re: 2-way communication with unix command
Message-Id: <5mf4mm$kr@trespassersW.local>
In article <bigiain-ya02408000R2705971715000001@news.ozemail.com.au>,
bigiain@mightymedia.com.au (Iain Chalmers) writes:
>In article <8cyb972n1h.fsf@gadget.cscaper.com>, Randal Schwartz
><merlyn@stonehenge.com> wrote:
>> My, how time flies. Perl5.000 was released 2.7 years ago, and was in
>> usable alpha/beta releases since at least mid 1993. "Everyone was
>> using perl version 4" hasn't been true for roughly 4 years.
>>
>> Perl4 is dead, long dead. Long live Perl5 (until Perl6 comes along :-).
Having recently accepted delivery of two new Unix boxes from "industry
leaders" and typed 'perl -v', the leading version digit was *NOT* 5.
If your management forbids you to install upgrades that don't come
from the vendor, then unfortunately perl 4 is a fact of life.
--
-----------------------------------------------------------------------
Jonathan R Hudson Email: jrh@jrhudson.demon.co.uk
WWW: http://www.jrhudson.demon.co.uk Voice/Fax: +44 (0)1703 867843
------------------------------
Date: Wed, 28 May 1997 11:23:38 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Jahwan Kim <jahwan@supernova.math.lsa.umich.edu>
Subject: Re: any editor for perl?--any editor written in Perl?
Message-Id: <Pine.GSO.3.96.970528112242.29234N-100000@kelly.teleport.com>
On 28 May 1997, Jahwan Kim wrote:
> Since we're on the subject, is there any editor written in Perl?
I haven't seen it, but I hear that there's a version of vi which uses
embedded Perl, so you can use Perl code to edit your files. I've gotta try
that. :-)
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 11:24:46 +2500
From: MadHat <madhat@flash.net>
Subject: Re: Any module to get shadow password to work?
Message-Id: <33ACFD6E.2DE1196E@flash.net>
I know to do it I have to have
use Shadows;
and I use
($name,$passwd) = getspnam($user);
and then to compare, since it is crypted
$crypt = crypt($guess, $passwd);
if ($crypt ne $passwd) {
&error("Sorry Can't do it"); # never let them know why it failed
}
That might help, but as mentioned before it does have to run as ROOT or
it won't work, SUID to ROOT
Tom Phoenix wrote:
>
> On 26 May 1997, Pao Wan wrote:
>
> > My system is running Solaris 2.51, and I can't get user passwd using
> > getpwent(). Is there any module dedicate to shadow password?
>
> Perl's getpwent function simply calls your system's getpwent. If that's
> properly installed, you should get everything you're supposed to get. Of
> course, if you're not running as root, you can't get somebody else's
> password, or what's the point of having shadow passwords installed? :-)
>
> Hope this helps!
>
> -- Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.lightlink.com/fors/
--
[[|%^)
MadHat
(aka Loonatik)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQCNAzN4upYAAAEEAMzo2VE6s3F7H3TfkoF83k39FGjvkcHe9foM6fFGXP50h3GW
qsuGjuDIEGoLW2Yx1H7mEcLlCX42la1XdW23LNUIzj9nMNwph3uP6+ovFULt0W23
xqB0W1duzcMd9tQ/3dSTskNJp7U67Okhz9vQyPv+kUO4GN5FSIyxX1xEYp0VAAUR
tBxNYWRIYXQgPG1hZGhhdEBqYXZhaGF1cy5jb20+
=tDoE
-----END PGP PUBLIC KEY BLOCK-----
------------------------------
Date: Thu, 29 May 1997 01:52:07 +0900
From: christopher <christopher@wonderlandinorbit.com>
Subject: Any non number but not a dot...
Message-Id: <338C62B7.64C@wonderlandinorbit.com>
Hello again..
Wandering through regular expression world guided by the usual sources
but need a hand with this:
- what could I use to check if a string has any non digit in it, as long
as that / those non digit is/aren't a dot. Don't care where anything
appears, I just need to return true if a string is made entirely of
numbers and dots.
As always, help is a delightful addition to my day.
Regards from wonderland
Christopher
Tokyo,May97
http://www.wonderlandinorbit.com
------------------------------
Date: Tue, 27 May 1997 19:55:00 +0300
From: Sefi Kraemer <skraemer@iil.intel.com>
Subject: binary conversions ??
Message-Id: <338B11E4.41C6@iil.intel.com>
Hi,
I need to convert a hex integer into a binary integer.
The former is proccesed and printed.
Does perl support such a feature? Do I have to right my own convertion
function?
Much obliged,
Sefi
------------------------------
Date: 26 May 1997 17:22:26 GMT
From: shaug@callamer.com (O'Shaughnessy Evans)
Subject: Re: Competent Perl Programmer Needed
Message-Id: <5mcgsi$13o$1@zinger.callamer.com>
In article <5m4pc5$7al@sjx-ixn6.ix.netcom.com>,
jeff@yoak.com (Jeff Yoak) writes:
> shaug@callamer.com (O'Shaughnessy Evans) wrote:
>> I think that a competent webmaster would be useful, as well.
>> Check out www.zoron.net to see what I mean.
>
> That's not really fair. They weren't advertising a website and they
> may very well be constructing it and be in the testing process. If
> none of that data is security-sensitive what's wrong with having that
> online?
>
> Cheers,
> Jeff
I was just trying to let them know that much of their document tree seemed
to be plainly visible. If they want to keep it that way, I don't care,
but just in case it was an accident, I figured they'd want to know. I was
kind of kidding about the "competent webmaster" part. If it was offensive,
then I apologize.
------------------------------
Date: Wed, 28 May 1997 11:14:00 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Linda Ferguson <fergy@tomco.net>
Subject: Re: database record check
Message-Id: <Pine.GSO.3.96.970528111323.29234K-100000@kelly.teleport.com>
On Tue, 27 May 1997, Linda Ferguson wrote:
> I work for a company that provides web-based access to various
> databases. Most of the dbs are updated daily. Recently we've had
> problems -- our data providers have not always given us the most recent
> data. I've been asked to write a script that will check to make sure
> that the records have been loaded properly.
>
> I'm checking CPAN and the various help sites out there, but i haven't
> found anything (yet) that addresses this type of situation.
You could use one of the methods for finding files, then check their
modification dates. Is that the sort of thing you need? Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 28 May 1997 13:37:34 GMT
From: goddard@pop.srv.ualberta.ca (Precision Farming Project)
Subject: dos, FOSSIL and COM ports
Message-Id: <5mhceu$ipo$1@pulp.ucs.ualberta.ca>
I seen in DOS_PERL.TXT by John Dallman (jgd @ cix.compulink.co.uk)
a suggestion about using the FOSSIL driver with perl to do
I/O with the COM devices. Has anyone had any experience with
this? Are there any WWW sites with information on this or
similar things. I've spent some time searching CPAN and the
1300 c.l.p.m articles at this site and not found anything
that appears to be immediately appropriate.
Thanks
Gordon Haverland
goddard @ gpu.ualberta.ca
haverlan @ agric.gov.ab.ca
------------------------------
Date: Wed, 28 May 1997 11:00:02 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Lewis <mjlewis@cybersource.com>
Subject: Re: Error checking with name strings
Message-Id: <Pine.GSO.3.96.970528105640.29234H-100000@kelly.teleport.com>
On Tue, 27 May 1997, Michael Lewis wrote:
> So I have four strings:
>
> $foo = "Smithington";
> $bar = "Smitington";
> $baz = "Smithingfton";
> $bip = "Smihtington";
>
> What's a good way to determine that each of the last three string
> segments are very similar to the first (within the realm of human bad
> typing)?
Some people are working on adding "approximate" matching abilities to
Perl's regular expression engine. Until that happens, it'll be a little
harder to do what you want. :-(
> Speed is important in this case.
Although you could do this in Perl, you probably want to make a quick
routine in C that will try to match up the first and last few characters
with the known string (the "bathtub effect"), and then produce a
likelihood index or an error count of some sort. That routine would be
easy to interface to Perl with a module.
Good luck!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 16:43:41 GMT
From: interbbs@hotmail.com (InternetPRO.)
Subject: FreeNetAccessWorldwid+
Message-Id: <337b0fe1.6519487@hiroken.hiroken.or.jp>
Free Adult Internet Connection Worldwid+ Via Our Bbs.
Follow the link and enjoy...
http://cybercity.hko.net/la/interbbs/freenet/free.htm
------------------------------
Date: Wed, 28 May 1997 16:20:44 GMT
From: Magnus.Bodin@tychonides.se (Magnus Bodin)
Subject: Re: Help Me!
Message-Id: <33905a7b.101425922@news1.telenordia.se>
"brian s." <brian@pluto.tekmarkinc.com > wrote:
>Hi I was wondering if anyone can help me and point me in the right
>direction. Please note this is not a job ad I just am a little lost. I am
>a relatively new technical recruiter. This is the first time I have been
>using the Internet as a recruiting source. So as anyone who is familiar
>with the Internet, is well aware it has an endless supply of information.
> My problem is I don't know how to access all of it.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So wisely spoken. The problem of us all. And yet the answer is
twofold:
1. This is not an issue for comp.lang.perl.misc
2. You can't access all of it. The sun will explode before you're
halfways.
/magnus
------------------------------
Date: Wed, 28 May 1997 13:51:46 GMT
From: tinomen@the-faktory.com (TinOmen)
Subject: Help using tes.awk please
Message-Id: <338c37f4.6027254@news.earthlink.net>
I am trying to use tes.awk command from within a perl prog. Obviously
it is not returning a value because it is not environmental like date.
Can someone please clue me in as to how to get the value from tes.awk
into a variable within the prog.
I am a perl newbie, this is my first day, any info you could supply me
would be loads of help. thanks
********************************
TinOmen
http://www.thefaktory.com
TinOmen@TheFaktory.com
to reply delete the "-"
********************************
------------------------------
Date: Wed, 28 May 1997 10:16:54 -0400
From: Dave Boswell <dave_boswell@nt.com>
Subject: Help with (
Message-Id: <338C3E56.138D@nt.com>
We have just recently moved to 5.004 and I am getting the following
error, which I am unable to figure out.
syntax error at line 2 : `(' unexpected
The script that generates this is as follows:
#!/usr/local/perl-5.004/bin/perl -w
print ( "hello world\n" );
When run from the command line, with 'perl -w file' it works fine, if I
however make the file executable and run it I get the error. I have
removed the () pair and ran it as an executable and everything is OK.
Any and all ideas would be helpful since we are now basically dead in
the water.
Thanks in advance ... Dave Boswell.
------------------------------
Date: 28 May 1997 10:21:08 -0500
From: scribble@shoga.wwa.com (Tushar Samant)
Subject: Re: Help with (
Message-Id: <5mhih4$9cr@shoga.wwa.com>
Dave Boswell <dave_boswell@nt.com> wrote:
> #!/usr/local/perl-5.004/bin/perl -w
> print ( "hello world\n" );
>
>When run from the command line, with 'perl -w file' it works fine, if I
>however make the file executable and run it I get the error. I have
>removed the () pair and ran it as an executable and everything is OK.
Check the shebang line; if there is whitespace before the "#", then
you are not running Perl at all. Your shell must have a built-in
print...
------------------------------
Date: 28 May 1997 16:04:01 GMT
From: quentin@hendrix.amd.com (Quentin Fennessy)
Subject: Re: Help with (
Message-Id: <5mhl1h$3kh$1@amdint2.amd.com>
Dave-
I suggest you try this command line:
$ /usr/local/perl-5.004/bin/perl -w <filename>
This will ensure that you can find perl where you expect to in the #! line.
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: Wed, 28 May 1997 12:15:55 -0400
From: Dave Boswell <dave_boswell@nt.com>
Subject: Re: Help with (
Message-Id: <338C5A3B.105E@nt.com>
Tushar Samant wrote:
>
> Dave Boswell <dave_boswell@nt.com> wrote:
> > #!/usr/local/perl-5.004/bin/perl -w
> > print ( "hello world\n" );
> >
> >When run from the command line, with 'perl -w file' it works fine, if I
> >however make the file executable and run it I get the error. I have
> >removed the () pair and ran it as an executable and everything is OK.
>
> Check the shebang line; if there is whitespace before the "#", then
> you are not running Perl at all. Your shell must have a built-in
> print...
No whitespace. I'm running ksh under HPUX 9.05, nothing special there.
Good sugestions, but still the same problem. We also had the admin
staff build in support for DBI and DBD::Oracle. Is there something that
may have caused this during the build?
Dave B.
------------------------------
Date: 28 May 1997 12:12:22 -0500
From: scribble@shoga.wwa.com (Tushar Samant)
Subject: Re: Help with (
Message-Id: <5mhp1n$3sr@shoga.wwa.com>
Dave Boswell <dave_boswell@nt.com> wrote:
>Tushar Samant wrote:
>>
>> Dave Boswell <dave_boswell@nt.com> wrote:
>> > #!/usr/local/perl-5.004/bin/perl -w
>> > print ( "hello world\n" );
>> >
>> >When run from the command line, with 'perl -w file' it works fine, if I
>> >however make the file executable and run it I get the error. I have
>> >removed the () pair and ran it as an executable and everything is OK.
>>
>> Check the shebang line; if there is whitespace before the "#", then
>> you are not running Perl at all. Your shell must have a built-in
>> print...
>
>No whitespace. I'm running ksh under HPUX 9.05, nothing special there.
>Good sugestions, but still the same problem. We also had the admin
>staff build in support for DBI and DBD::Oracle. Is there something that
>may have caused this during the build?
Then I'm at a loss. I don't know anything about HPUX, but maybe you
should make the path of perl shorter than what you have. (Perhaps by
making a temporary symlink from ~/bin/perl).
For whatever it's worth, your error message looked very shell-like.
Perl errors look slightly different; that was the reason for my
suggestion. I still think it's worth checking paths etc, and also
testing things other than print--but I guess you have done it already.
------------------------------
Date: Wed, 28 May 1997 11:35:07 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dave Boswell <dave_boswell@nt.com>
Subject: Re: Help with (
Message-Id: <Pine.GSO.3.96.970528113321.29234Q-100000@kelly.teleport.com>
On Wed, 28 May 1997, Dave Boswell wrote:
> We have just recently moved to 5.004 and I am getting the following
> error, which I am unable to figure out.
>
> syntax error at line 2 : `(' unexpected
Error messages, by their nature, often are terse. When you can't figure
out an error message that you get for your Perl script, use the handy
perldiag(1) manpage. It says,
syntax error at line %d: `%s' unexpected
(A) You've accidentally run your script through the
Bourne shell instead of Perl. Check the <#!> line, or
manually feed your script into Perl yourself.
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 11:25:43 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: r.polanskis@nepean.uws.edu.au, grove@zeta.org.au
Subject: Re: Linux issues with 5.004.
Message-Id: <Pine.GSO.3.96.970528112443.29234O-100000@kelly.teleport.com>
On 27 May 1997, Rachel Polanskis wrote:
> I also noted some issues with Linux and perl 5.004
> Although the compile went perfectly, the tests failed on
> all the DBM, SDBM, GDBM, and NDBM modules, and some of the op* ones.
Sounds like dynamic linking failed. But I'm just guessing... Hope this
helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 11:10:07 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Rob Perelman <robp@electriciti.com>
Subject: Re: Magical Auto-increment operator
Message-Id: <Pine.GSO.3.96.970528110135.29234I-100000@kelly.teleport.com>
On Tue, 27 May 1997, Rob Perelman wrote:
> My proposal was to skip over non-alphanumeric characters. So your
> example of '3/9' would increment to '4/0', and then '4/1' ... '4/9',
> '5/0'.
So, you'd increment just the alphanumeric characters found in the string?
Hmmm... Would you increment '-7' to '-8'? :-) Would you turn "3.14159"
into "3.14160"? (If you used that value as a number and then incremented
it again, you would get "3.1417".)
Part of the design of the current magic ensures that unexpected magic
won't do anything harmful. That is, if you magically increment the string
'123', you get the same result as if you incremented the number 123. But
if you increment "123\n", you should get 124, not "124\n", since that's
what somebody ignorant of the magic might be expecting.
> Perl's answer to '3/9' is 4. I _really_ don't understand that.
Well, Perl sees '3/9' as a number; it's not a string eligible for magical
incrementing. So the number it sees is three, and it increments that to
get four.
The magical autoincrement doesn't do much, but I think it's more useful as
it is. Of course, you could easily make a module that would let you easily
implement your own autoincrement.
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 28 May 1997 16:14:36 GMT
From: "Dwayne Kruk" <dkruk@ilos.net>
Subject: NcFTP, Perl, CGI - Permission Denied
Message-Id: <01bc6b82$339a4500$f6e32dce@dkruk.ilos.net>
I writing a CGI script for the web in Perl that will downloads files from
remote servers.
When I execute ncftp in one of my lines of code, I'm getting permission
denied errors.
Do I have to set the user id bit? If so, how do I accomplish this?
Dwayne
dkruk@ilos.net
------------------------------
Date: Wed, 28 May 1997 16:11:25 GMT
From: Magnus.Bodin@tychonides.se (Magnus Bodin)
Subject: Re: Open and print HTML file insside CGI script
Message-Id: <338c58f5.101035240@news1.telenordia.se>
ebohlman@netcom.com (Eric Bohlman) wrote:
>Miran Sepic (miran.sepic4@mss.tel.hr) wrote:
>
>: $login_page = "/user/download.html";
>: open (FILE, "$login_page");
>: @filein = <FILE>;
>: print "Content-type: text/html\n\n";
>: print @filein;
>
>: The response is:
>
>: Internet explorer cannot open the Internet site .....
>: The operation completed successfully.
>
>: When I put HTML directly inside script, everything is OK.
>
>You aren't checking to see if your open() was successful. How do you
>know that you were actually sending *anything* out?
>
>
MSIE comes with just such a report if nothing is returned after the
Content-type: text/html\n\n
So if @filein is empty, then MSIE reports:
>: Internet explorer cannot open the Internet site .....
>: The operation completed successfully.
------------------------------
Date: Wed, 28 May 1997 16:39:08 GMT
From: Magnus.Bodin@tychonides.se (Magnus Bodin)
Subject: Re: Open and print HTML file insside CGI script
Message-Id: <33915f8e.102724970@news1.telenordia.se>
Magnus.Bodin@tychonides.se (Magnus Bodin) wrote:
>ebohlman@netcom.com (Eric Bohlman) wrote:
>
>>Miran Sepic (miran.sepic4@mss.tel.hr) wrote:
>>
>>: $login_page = "/user/download.html";
>>: open (FILE, "$login_page");
>>: @filein = <FILE>;
>>: print "Content-type: text/html\n\n";
>>: print @filein;
>>
>>: The response is:
>>
>>: Internet explorer cannot open the Internet site .....
>>: The operation completed successfully.
>>
>>: When I put HTML directly inside script, everything is OK.
>>
>>You aren't checking to see if your open() was successful. How do you
>>know that you were actually sending *anything* out?
>>
>>
>
>MSIE comes with just such a report if nothing is returned after the
>Content-type: text/html\n\n
>
>So if @filein is empty, then MSIE reports:
>>: Internet explorer cannot open the Internet site .....
>>: The operation completed successfully.
>
And by the way netscape does not.
------------------------------
Date: Wed, 28 May 1997 11:12:54 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Jay Scherberth <editor@primenet.com>
Subject: Re: Password Protection - NT
Message-Id: <Pine.GSO.3.96.970528111155.29234J-100000@kelly.teleport.com>
On 27 May 1997, Jay Scherberth wrote:
> Is is possible to password protect a cgi-bin on an NT server using
> IIS3.0?
This sounds like a server question, not a Perl question. Try asking in a
group about servers, or (better yet) check their FAQ. Good luck!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 28 May 1997 11:25:29 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: Perl 5.004 on HP-UX 10.20
Message-Id: <5mhpq9$40d@nyx10.cs.du.edu>
I've lost the specifics on this, but's I think it's a bug associated
with HP's softbench product.
Softbench creates a binary called make, which is supposed to set up some
environment, then fork() and exec() the real make. It ends up execing
itself, and starting the endless loop.
Try creating a short makefile to verify this, then poke around HP's
web site to find the patch. (sorry, I don't have the patch # handy)
--
Kerry
In article <5mh8bu$mv4$1@grapool30.rz.uni-frankfurt.de>,
Anselm Lingnau <lingnau@tm.informatik.uni-frankfurt.de> wrote:
>I'm trying to compile Perl 5.004 on a HP 9000/C160 running HP-UX 10.20.
>When I do a `sh Configure -Dprefix=/local/pkg/perl/5.004 -des' on a
>fresh copy of the distribution tree, the configuration script runs
>through, but then what happens is
>
> Extracting writemain (with variable substitutions)
> Extracting x2p/Makefile (with variable substitutions)
> Extracting x2p/cflags (with variable substitutions)
> Run make depend now? [y]
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
> make depend MAKEDEPEND=
> sh ./makedepend
>
>until the system runs out of processes. It works fine when I try it
>on a DEC Alpha.
>
>Has anybody had the same experience, or any idea about what to do?
>
>Anselm
>--
>Anselm Lingnau ......................... lingnau@tm.informatik.uni-frankfurt.de
>A society that will trade a little liberty for a little order will lose both,
>and deserve neither. --- Thomas Jefferson
------------------------------
Date: 28 May 1997 16:21:43 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: perl newbie stuck!!
Message-Id: <oeeg1v720m0.fsf@alpha.hut.fi>
Sorry but your question has practically nothing to do with Perl.
You are asking in the wrong newsgroup. Please ask in the newsgroup
comp.infosystems.www.authoring.cgi
Also, when you ask in there, please try to be a little bit more
specific in your question, like for example show your HTML/CGI code.
Some HTML/CGI experts might hang around in the c.i.w.a.cgi group
but even they are not that good that they can from your description
("works fine on simple page", "utilised the script in frames"...
what is a "simple page"? what "script"?) -- and besides, if your
problem is a really tough one those experts will not work for free:
can you afford their consulting rates?
--
$jhi++; # http://www.iki.fi/~jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: Wed, 28 May 1997 11:17:05 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Sacha Fernandez <sage@ans.com.au>
Subject: Re: perl newbie stuck!!
Message-Id: <Pine.GSO.3.96.970528111520.29234L-100000@kelly.teleport.com>
On Wed, 28 May 1997, Sacha Fernandez wrote:
> when I implement a form which utilises the script in frames I'm not
> quite sure how to direct the jump to pages into the main body of the
> page.
So, it's not a Perl problem, it's a problem having to do with the
interface to frames. You should try a newsgroup about web browsers or
maybe HTML, or that group's FAQ. Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 28 May 1997 15:46:09 +0200
From: Christian Mallwitz <mallwitz@intershop.de>
Subject: Perl306/ISAPI/socket bug on NT
Message-Id: <uaflfwvz2.fsf@intershop.de>
Hi,
In order to find a fix for the (known) bug with ISAPI/Perl306 on
Windows NT in conjunction with sockets I want to present a script
which reproduces the error.
The script connects to a SMTP server. You have to configure a SMTP
server name and the CGI script name (in the META line). The browser
will start the script again and again.
As long as there is just one such iteration the script works fine for
a while. If you access the script in a second browser in parallel it
won't take long and ISAPI/Perl306 is no longer able to create a
working socket. As it was pointed out it could be that a socket was
not closed correctly.
In my case there appears to be some garbage character after closing
the connecting which don't appear if the script runs with perl.exe
I was not able to pinpoint where this character come from.
It was mention that Java JDK 1.0.2 from Sun had exactly the same bug
and sockets never closed there either. Does anyone know how this bug
was fixed ?
Christian
--------------------------------------------------------------------------------
use Socket;
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"0; URL=/Scripts/mail.plx\">\n\n";
my ($ret) = sendmail("netconsult.intershop.de");
# printf "%02lx %02lx %02lx %02lx<br>\n", unpack('C16', $ret);
print $ret;
print "\n\n<BR>sendmail terminated<BR>\n";
sub sendmail {
my($debug) = 1;
my($smtp) = @_;
my($proto) = (getprotobyname('tcp'))[2];
my($port) = (getservbyname('smtp', 'tcp'))[2];
my($smptaddr) = ($smtp =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/)
? pack('C4',$1,$2,$3,$4)
: (gethostbyname($smtp))[4];
if (!defined($smptaddr)) { return -1; }
# if (!socket(S, AF_INET, SOCK_STREAM, $proto)) { return -2; }
# if (!connect(S, pack('Sna4x8', AF_INET, $port, $smptaddr))) { return -3; }
# shutdown S, 2;
# close S;
if (!socket(S, AF_INET, SOCK_STREAM, $proto)) { return -2; }
if (!connect(S, pack('Sna4x8', AF_INET, $port, $smptaddr))) { return -3; }
if (eof(S)) { print "<BR>end of file after connect<BR>\n"; exit(1); }
my($oldfh) = select(S); $| = 1; select($oldfh);
$_ = <S>;
print "$_<BR>" if $debug;
if (/^[45]/) { close S; print "$_<BR>" if $debug; return -4; }
print S "helo localhost\r\n";
print "helo localhost<BR>\n" if $debug;
$_ = <S>;
print "$_<BR>" if $debug;
if (/^[45]/) { close S; print "$_<BR>" if $debug; return -5; }
print S "quit\r\n";
print "quit<BR>\n" if $debug;
$_ = <S>;
print "$_<BR>" if $debug;
if (!eof(S)) { print "<BR>not eof after quit<BR>\n"; }
shutdown S, 2; # ?
close S;
return 1;
}
--------------------------------------------------------------------------------
------------------------------
Date: 27 May 1997 19:36:03 -0400
From: Horst von Brand <vonbrand@inf.utfsm.cl>
Subject: Re: Pkgadd version of Perl 5?
Message-Id: <m1oh9w7ajg.fsf@pincoya.inf.utfsm.cl>
Ethan Mason <emason@majic.co.jp> writes:
> [How to compile perl?]
Take a look at the setting of $PATH done in the Configure script, ad put
you compiler at some place where it is found.
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
------------------------------
Date: Wed, 28 May 1997 13:12:07 -0400
From: Yvonne Wang <yvonne@att.com>
Subject: Problem with crypt
Message-Id: <338C6767.1A0C@att.com>
Hi,
When I try to encrypt a text which is more than 8 chars, it seems the
result is the same as that of first 8 chars. The following is the test
program:
#!/usr/local/bin/perl
$pw1='abcdefgh';
$pw2='abcdefghi';
$salt='afdf';
if(crypt($pw1,$salt) ne crypt($pw2,$salt))
{
print "OK\n";
} else {
print "unbelievable\n";
}
Any help would be appreciated.
Thanks,
Yvonne
yvonne@att.com
------------------------------
Date: Wed, 28 May 1997 16:30:05 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Question: Pattern Matching and Counter Variables
Message-Id: <adelton.864837005@aisa.fi.muni.cz>
Bal Grewal <sheptonp@oup.co.uk> writes:
> Hi,
>
> I was wondering if anyone could offer me some help.
>
> I'm trying to write a script to mark-up a bibliographic section into
> SGML.
>
> The individual references consist of:
>
> <bb>Author name, blah, blah, blah ...</bb>
>
> What I want to do is - where I find an instance of <bb>, I want to
> replace it with <bb ID="$counter">, where $counter is the ID number of
> the bibliographic reference in relation to other references already
> matched, counted and number ID inserted.
> $counter is incremented after each match and substitution is made
>
> Any suggestions?
my $counter = 1;
while (<>)
{
s/<bb>/<bb ID="$counter">/ and $counter++;
print;
}
__END__
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 28 May 1997 12:25:31 -0500
From: scribble@shoga.wwa.com (Tushar Samant)
Subject: Re: Question: Pattern Matching and Counter Variables
Message-Id: <5mhpqb$6or@shoga.wwa.com>
>> What I want to do is - where I find an instance of <bb>, I want to
>> replace it with <bb ID="$counter">, where $counter is the ID number of
>> the bibliographic reference in relation to other references already
>> matched, counted and number ID inserted.
>> $counter is incremented after each match and substitution is made
Honza Pazdziora <adelton@fi.muni.cz> wrote:
>my $counter = 1;
>while (<>)
> {
> s/<bb>/<bb ID="$counter">/ and $counter++;
> print;
> }
You depend on there being no more than one <bb> per line (and
there is no saying what a "line" is).
One way to correct this would be:
s/<bb>/'<bb ID="' . $counter++ . '">'/ge;
print;
------------------------------
Date: Wed, 28 May 1997 14:08:11 -0400
From: Glen Culbertson <nnyxcu@ny.ubs.com>
Subject: Re: Question: Pattern Matching and Counter Variables
Message-Id: <338C748B.2AEF@ny.ubs.com>
Bal Grewal wrote:
>
> Hi,
>
> I was wondering if anyone could offer me some help.
>
> I'm trying to write a script to mark-up a bibliographic section into
> SGML.
>
> The individual references consist of:
>
> <bb>Author name, blah, blah, blah ...</bb>
>
> What I want to do is - where I find an instance of <bb>, I want to
> replace it with <bb ID="$counter">, where $counter is the ID number of
> the bibliographic reference in relation to other references already
> matched, counted and number ID inserted.
> $counter is incremented after each match and substitution is made
>
> Any suggestions?
>
I couldn't find a way to do this in one line, but it is easy to test
and then increment and substitute. If $_ has the line:
if (/<bb>/) {
$counter++;
s/<bb>/<bb ID="$counter">/;
}
This assumes:
1. That only one '<bb>' is on a line, and
2. That you really want the double quotes, e.g.: ID="1".
Maybe someone else has a 1-line that will educate us both.
> Thanks,
>
> Pete
------------------------------
Date: Wed, 28 May 1997 11:29:32 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Bal Grewal <sheptonp@oup.co.uk>
Subject: Re: Question: Pattern Matching and Counter Variables
Message-Id: <Pine.GSO.3.96.970528112726.29234P-100000@kelly.teleport.com>
On Wed, 28 May 1997, Bal Grewal wrote:
> where I find an instance of <bb>, I want to replace it with <bb
> ID="$counter">, where $counter is the ID number of the bibliographic
> reference in relation to other references already matched, counted and
> number ID inserted. $counter is incremented after each match and
> substitution is made
Could you want this? Hope this helps!
s/<bb>/ '<bb ID="' . $counter++ . '">' /eg;
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 17:11:54 GMT
From: nospam@this.address (TOTO)
Subject: The CGI & PERL Discussion Forum Here!
Message-Id: <338c24c6.3227650@news.enterprise.net>
Hi,
For any questions regarding CGI & PERL, post them at the
CGI discussion forum as well as USENET?
http://www.bitsmart.com/sas
You may well increase the chances of your questions being answered.
Please pass the word around and lets see if we can all help each
other.
Regards
Toto
sas@bitsmart.com
http://www.bitsmart.com/sas - The way to the CGI discussion forum
------------------------------
Date: Wed, 28 May 1997 11:21:59 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Peter Marks <marks@halcyon.com>
Subject: Re: Who am I? (I'm a perl script)
Message-Id: <Pine.GSO.3.96.970528111803.29234M-100000@kelly.teleport.com>
On 27 May 1997, Peter Marks wrote:
> If a perl script needs to know its containing directory (e.g., to find
> related files) without hardcoding it in, a common trick is to strip the
> filename off $0. On my current system (an NCR processor running SVR4
> and perl 5.003), this fails when the script is suid or sgid to something
> other than the user's current settings. In that case $0 takes a value
> like "/dev/fd/3".
Yes. In that case, your script has no way (AFAIK) to know what file it was
read from, or even whether that file still exists. You can search through
the user's PATH and such, but even if you find what seems to be the
script, there's no telling for sure.
Hardcoding the location doesn't look so bad now, does it? :-)
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 28 May 1997 17:35:12 +0200
From: Jeremie FARCIS <jfarcis@ifhamy.insa-lyon.fr>
Subject: Win32::ODBC - Parse exception
Message-Id: <338C50B0.1A00@ifhamy.insa-lyon.fr>
Hello !
I am trying to use win32::ODBC to access an ODBC database
(SQL server). I am working on windows NT 4.0.
But my workstation is a Dec Alpha !!
Each time i run a perl script that uses win32::odbc, I have
a 'parse exception'. I readed in the win32::odbc FAQs that it was
a release problem. But it is the same with the builds 306, 304, and
110 of perl.
Is it a problem due to the OBDC.ppl file ? I think pll files
are compiled. So if I don't have an alpha binary code... it won't work !
(I use the Alpha_ODBC.pll available on ftp://ftp.roth.net/pub/ntperl/
that i renamed ODBC.pll and placed in the lib/auto/win32/odbc
directory). But i am
a beginner and don't know much on perl modules. I don't know where to
get some
informations on pll files.
If you have any suggestion please help me !!
Thank you by advance.
Jeremie.
jfarcis@ifhamy.insa-lyon.fr
------------------------------
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 532
*************************************