[13343] in Perl-Users-Digest
Perl-Users Digest, Issue: 753 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 9 18:07:17 1999
Date: Thu, 9 Sep 1999 15:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 9 Sep 1999 Volume: 9 Number: 753
Today's topics:
About "Permission Dennied" <uov02694@correo.uniovi.es>
Re: Can't load 7.3 db with 8.1 sqlldr (Jamie Schrumpf)
Error when calling system command via Apache <phil@surfacing93.freeserve.co.uk>
foreach oddity <debr@hpesdebr.fc.hp.com>
fork doesn't like me or .... <tdn00709@tijd.com>
Re: Format a var to 2 decimal places!! <gellyfish@gellyfish.com>
Re: Format a var to 2 decimal places!! <agray@infoscience.otago.ac.nz>
Re: Frames using perl <gellyfish@gellyfish.com>
Good way to learn PERL <matthew357@hotmail.com>
How do I get Userid <rp7667@email.sps.mot.com>
How to capture STDERR from the perl binary raymondj@NOSPAM.raleigh.ibm.com
How to run a script from a script? <frey@saturn.med.nyu.edu>
Re: How to send control codes from Expect module <wpflum@my-deja.com>
Re: HTTP and HTTPs request work the same right ? (Abigail)
HTTP and HTTPS requests work the same in LWP, right ? <Mark.Conlin@bridge.bellsouth.com>
Re: HTTP and HTTPS requests work the same in LWP, right (Mads Toftum)
Re: information about the use of linguistic in Perl (Andrew Johnson)
LWP for NT <susan@dietzdesign.com>
Re: LWP for NT (Mads Toftum)
Re: Mac Perl problems (Arved Sandstrom)
Re: Old Script Doesn't Like My New Perl? Help! (Dan Poynor)
Re: Parsing tags? <aqumsieh@matrox.com>
Re: Perl fails tests <jsmith@mcs.drexel.edu>
Perl ISAPI Not Working: script product no output <sushant@hindustan.vnet.net>
Re: perl/sendmail: encoding special chars <gellyfish@gellyfish.com>
Re: Premature end of script headers <sariq@texas.net>
Re: Recursively Copy in NT? <martinb@talx.com.no.spam>
server down or is code wrong. <Mark.Conlin@bridge.bellsouth.com>
Re: server down or is code wrong. <Mark.Conlin@bridge.bellsouth.com>
Re: setuid & real uid <gellyfish@gellyfish.com>
Re: suggestion to revise grep (another Q: reference com (Ilya Zakharevich)
taking a query from a web browser dhuang11@my-deja.com
tie()d hashes and scalar context <crdevilb@mtu.edu>
Re: tie()d hashes and scalar context <uri@sysarch.com>
Re: Win32::ODBC help <gellyfish@gellyfish.com>
Re: Win32::ODBC help <carvdawg@patriot.net>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 09 Sep 1999 23:43:04 +0200
From: Luis Toyos <uov02694@correo.uniovi.es>
Subject: About "Permission Dennied"
Message-Id: <37D829E8.A4C218AA@correo.uniovi.es>
Hi folks;
I need some help;
My system is : Solaris UNIX; Perl version 5.004_04 built for
sun4-solaris ;Apache 1.3.3
I am trying to execute an open(FILE,">file.dat") from a CGI and the
system returns a 'Permission dennied'.
I was trying to do a 'chmod 777 directory'; (file.dat is @ directory),
but
it does not work
Thanks
Please, answer me at my email...
Luis Toyos
luis@internorte.net
------------------------------
Date: 9 Sep 1999 21:21:09 GMT
From: hatterasNOSPAM@hotbot.com (Jamie Schrumpf)
Subject: Re: Can't load 7.3 db with 8.1 sqlldr
Message-Id: <7r98c5$7uu$2@birch.prod.itd.earthlink.net>
In article <7r6i72$mtm$1@holly.prod.itd.earthlink.net>,
hatterasNOSPAM@hotbot.com says...
>
>Whenever I try to load my 7.3 db with the 8.1 sqlldr, I get an "unable to
>locate handle for character set (0)" error (or words to that effect). If I
>use the very same, unaltered script with the 8.1 db and 8.1 sqlldr, it works
>fine; ditto if I use the 7.3 sqlldr with the 7.3 db.
>
>Both dbs use the same nls_language, nls_territory, and nls_characterset
values.
>One anomaly I have noticed is that sqlldr thinks that "sid" is a keyword. I
>have several tables that use "sid" as an acronym for "system identification."
>I also cannot find any documentation in the 8.1 reference CD that says "sid"
>_is_ a keyword -- it's not in the official list of keywords!
>
>Could these issues be related?
I'll be doggoned! This is what happens when you're thinking about one problem
and reading an unrelated newsgroup.
Sorry about the off-topicness.
In case you're interested anyway, it's an Oracle bug. The help desk told me
this morning.
>--
>------------------------------------------------------------------------------
-
>Jamie Schrumpf
http://home.earthlink.net/~moncominc
>
>
--
-------------------------------------------------------------------------------
Jamie Schrumpf http://home.earthlink.net/~moncominc
------------------------------
Date: Thu, 9 Sep 1999 21:24:45 +0100
From: "Phil Griffiths" <phil@surfacing93.freeserve.co.uk>
Subject: Error when calling system command via Apache
Message-Id: <7r950l$ba3$1@lure.pipex.net>
To assist in the administration of a remote server running RedHat 6.0, I am
using the following script to shut it down via a browser.
#!/usr/bin/perl
print <<END_of_Multiline_Text;
Content-type: text/html
<HTML>
<HEAD>
<TITLE>Powering Down...</TITLE>
</HEAD>
<BODY>
<H1>Powering down NOW!</H1>
</BODY>
</HTML>
END_of_Multiline_Text
system("su -c poweroff");
The problem I have is that whilst this script works in a Terminal I get the
following error in the HTTPD error log when calling it from a cgi-bin
directory with a web-browser:
standard in must be a tty
Where am I going wrong and what alterations need to be made to the above
script, bearing in mind that my knowledge of Perl is just above beginner
level.
Many thanks in advance,
--
Phil Griffiths
------------------------------
Date: Thu, 09 Sep 1999 15:39:08 -0600
From: David Bradley <debr@hpesdebr.fc.hp.com>
Subject: foreach oddity
Message-Id: <37D828FC.6A10D5D8@hpesdebr.fc.hp.com>
Has anyone noticed that if you try
to return the value of the foreach
iterator in a function, you are screwed.
For example
sub func {
foreach my $i (1..10) {
return $i if $i == 4; } }
print &func();
doesn't print anything out. Doing the following
seems to rectify the problem:
sub func {
foreach my $i (1..10) {
return (my $retval = $i) if $i == 4; } }
print &func();
Questions:
----------
1) Is this a documented feature?
2) Can this be easily fixed?
- Dave
P.S. For the cut and pasters out there:
perl5 -le 'sub junk { foreach my $i (1..10) { return $i if $i == 4; } }
print &junk();'
perl5 -le 'sub junk { foreach my $i (1..10) { return (my $retval = $i)
if $i == 4; } } print &junk();'
------------------------------
Date: Thu, 09 Sep 1999 22:28:13 +0200
From: Luc Arits <tdn00709@tijd.com>
Subject: fork doesn't like me or ....
Message-Id: <37D8185D.D1C5EE3B@tijd.com>
I'm writing a program in perl/gtk
it downloads data from the net and puts it in files
it draws a chart of that data
it extracts text from Html-files
I'm trying to fork the downloading, so I can still use the GUI:
the downloading succeeds but ends with the next message in the shell:
"Xlib: unexpected async reply (sequence 0x5383)!"
the code:
this subroutine gets called when button is clicked
sub update_news {
my $pid;
STDOUT->autoflush(1);
$pid=fork();
if ($pid == 0){ #child
download the HTML, parse it and save txt
exit(1)
}
else{
close (STDOUT);
close(STERR)
}
}
can anyone please
help me?
Thanks in advance
--
Luc Arits:
tdn00709@tijd.com
------------------------------
Date: 9 Sep 1999 19:59:33 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Format a var to 2 decimal places!!
Message-Id: <7r93j5$6e9$1@gellyfish.btinternet.com>
On Wed, 8 Sep 1999 20:50:03 -0400 Rich Harris wrote:
>
> Also are there any good sites out there which list perl commands etc.
>
You should have the documentation on your hard drive - with that you
should be able to answer the question yourself.
man perl
or failing that
perldoc perl
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 10 Sep 1999 09:50:45 +1200
From: Andrew Gray <agray@infoscience.otago.ac.nz>
Subject: Re: Format a var to 2 decimal places!!
Message-Id: <un1uviwju.fsf@infoscience.otago.ac.nz>
"Rich Harris" <rich.harris@#prodigy.net> writes:
> How do you format a variable to 1 or 2 decimal places?
"perldoc -f printf" and "perldoc -f sprintf" (look at both).
> Also are there any good sites out there which list perl commands etc.
perldoc contains everything necessary as far as the Perl language is
concerned. Your best bet, in my opinion, would be to browse perldoc
(which may be available in HTML on your system). On the other hand,
www.perl.com contains many useful articles on programing in Perl per
se.
Cheers,
Andrew
------------------------------
Date: 9 Sep 1999 20:01:34 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Frames using perl
Message-Id: <7r93mu$6ee$1@gellyfish.btinternet.com>
On Mon, 06 Sep 1999 23:48:24 +1700 chandu wrote:
> Hello friends,
>
> I want to in corporate frames using perl.
> i have an index page in which i divided into two frames i
> want to give the src file as my perl files can i have like
> this if yes please give me the details.
>
You should read the section of the CGI.pm manpage entitled:
WORKING WITH NETSCAPE FRAMES
Or alternatively ask in a group that is concerned with HTML or CGI.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 9 Sep 1999 18:25:39 -0300
From: "Jim Carison" <matthew357@hotmail.com>
Subject: Good way to learn PERL
Message-Id: <7r98j0$er$1@f1.andara.com>
Hello. I am fairly new to PERL and CGI. Although I understand enough to make
small scripts that do a little bit of stuff, I am interested in making my
skills good enough to use on the commercial level. If you can give me any
information as to how I can learn PERL much better without a lot of upfront
costs (like IT schools) but things like webpages or good books.
------------------------------
Date: Thu, 09 Sep 1999 13:48:47 -0500
From: Omar Soto <rp7667@email.sps.mot.com>
Subject: How do I get Userid
Message-Id: <37D8010F.D403EFFD@email.sps.mot.com>
Hello:
I have been trying to get the userid and the effective userid thru a
print of the variables:
$< and $>. I also tried using $EFFECTIVE_USER_ID and $REAL_USER_ID and
it does not work.
It returns an integer. How do I get this value and then how do I change
it? `setuid $value` is not working.
Thank You,
Omar Soto
------------------------------
Date: Thu, 09 Sep 1999 20:47:55 GMT
From: raymondj@NOSPAM.raleigh.ibm.com
Subject: How to capture STDERR from the perl binary
Message-Id: <37e21846.20182328@mdnews.btv.ibm.com>
I have the following simple program called test.pl
#!/usr/local/bin/perl
while(1) {
sleep(10);
}
If I run this from the prompt using the following command:
test.pl >out 2>&1
and then I issue a sigkill via kill -9 (pid of the perl process) I get
a text message of "Killed" from the perl binary but I want to capture
this text in the file "out" as described above.
Seondly, how can the perl binary catch the sigkill interrupt in order
to print the "Killed" message in the first place?
Thanks for your help.
------------------------------
Date: Thu, 09 Sep 1999 17:09:46 -0400
From: Joe Frey <frey@saturn.med.nyu.edu>
Subject: How to run a script from a script?
Message-Id: <37D82217.DAE99E2F@saturn.med.nyu.edu>
I'm using a file grepped fron ps to determine if I need to restart
another script. All works well except #exec "home/joe/31donegone.pl";#
How do I call a script from a script?
--
Joe Frey
Assistant Facility Manager
Digital Media Center
The Skirball Institute Of Biomolecular Medicine
New York University Medical Center
540 First Ave., New York City, NY 10016 USA
frey@saturn.med.nyu.edu
http://saturn.med.nyu.edu/~weider/
http://www.med.nyu.edu/graphics
------------------------------
Date: Thu, 09 Sep 1999 20:02:28 GMT
From: Bill <wpflum@my-deja.com>
Subject: Re: How to send control codes from Expect module
Message-Id: <7r93oa$ugl$1@nnrp1.deja.com>
Thanks at least I know I'm sending the correct codes now. The only
problem and I'm assuming that it might be related to Expect is that the
control codes seem not to be acting like control codes when I call
telnet from Expect. What I mean is that when Expect runs telnet it
gets to the screen looking for a 'Do' key and then waits there. I'm
not sure what is happening, it should have sent the contol sequence for
the 'Do' key but nothing happens and to top it off if I press any of
the control keys including the 'Do' key I get the ascii representation
on the screen instead of continuing on. What am I missing? I'm
sending the last command using a print $telnet chr(0x1b) & chr(0x5b) &
chr(0x32) & chr(0x39) & chr(0x7e); (These are the valuse I got using
that perl script you posted) If I telnet in normally I can hit my 'Do'
key and it works just fine. I'll keep banging my head against the wall
for a while maybe I'll dislodge the answer that way but any help will
be appreciated, especially by the wall as I can be very thick headed
sometimes;)
<SNIP>
> The straightforward way would be to press them while running this
script:
> perl -ne 'print unpack ("H*", $_), "\n"'
>
> Here's a sample session:
> kirk:/home/kragen/ perl -ne 'print unpack ("H*", $_), "\n"'
>
> 0a
>
> 0a
> ^[[[A
> 1b5b5b410a
>
> The '0a's are linefeed characters, which Unix uses for newlines; the
> ^[[[A is me pressing F1, which generates escape, left square bracket,
> left square bracket, capital A -- or in hex, 1b, 5b, 5b, 41. (The 0a
> is from me hitting return again.)
>
> HTH.
> Kragen
> --
> <kragen@pobox.com> Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Thu Sep 09 1999
> 60 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 9 Sep 1999 16:24:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: HTTP and HTTPs request work the same right ?
Message-Id: <slrn7tg9i1.pg8.abigail@alexandra.delanet.com>
Mark Conlin (Mark.Conlin@bridge.bellsouth.com) wrote on MMCC September
MCMXCIII in <URL:news:37D82176.725EBFA9@bridge.bellsouth.com>:
## I am using LWP to make http requests, the documentation states
##
## "Everything about HTTP requests above holds for HTTPS"....
##
## Okay, so how come the code does not work...
Because there is a bug.
Abigail
--
perl -wlpe '}$_=$.;{' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 09 Sep 1999 17:16:33 -0400
From: Mark Conlin <Mark.Conlin@bridge.bellsouth.com>
Subject: HTTP and HTTPS requests work the same in LWP, right ?
Message-Id: <37D823B1.21AB28C5@bridge.bellsouth.com>
I am using LWP to make http requests, the documentation states
"Everything about HTTP requests above holds for HTTPS"....
but this does not work, is there anything else special
I need to do to make this function.
my $ua = new LWP::UserAgent;
$ua->proxy('http', 'http://proxy.bst.bls.com:8080/');
$ua->no_proxy('bst.bls.com');
$ua->agent("Mozilla/4.06 [en]");
$req = new HTTP::Request 'GET' => 'https://lensb.bellsouth.com/';
$req->header('Accept' => 'text/html');
$res = $ua->request($req);
if ($res->is_success){
print "it worked";
} else {
print "it failed";
}
------------------------------
Date: Thu, 09 Sep 1999 21:38:00 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: HTTP and HTTPS requests work the same in LWP, right ?
Message-Id: <37db2884.2061203@news.inet.tele.dk>
On Thu, 09 Sep 1999 17:16:33 -0400, Mark Conlin
<Mark.Conlin@bridge.bellsouth.com> wrote:
>I am using LWP to make http requests, the documentation states
>"Everything about HTTP requests above holds for HTTPS"....
>but this does not work, is there anything else special
>I need to do to make this function.
All you need to do is to install Crypt::SSLeay - then LWP will be able
to handle https requests.
vh
Mads Toftum, QDPH
som på USENET repræsenterer sig selv og ingen andre.
------------------------------
Date: Thu, 09 Sep 1999 22:04:06 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: information about the use of linguistic in Perl
Message-Id: <q9WB3.9032$0M6.201423@news1.rdc2.on.home.com>
In article <xLTB3.50$N77.5790@typ11.nn.bcandid.com>,
Kragen Sitaker <kragen@dnaco.net> wrote:
! In article <7r8uad$pvn$1@nnrp1.deja.com>,
! aron håkanson <aron@comitor.com> wrote:
! > Is there any information available about how Larry Wall's earlier
! >occupation as a linguist affected the different syntax in Perl? And what
! >makes the syntax in Perl easier to learn/use in comparison with other
! >languages?
!
! Consider reading his State of the Onion addresses:
! http://kiev.wall.org/~larry/. He talks a little bit about it.
!
! I'd be interested in reading more, of course. :)
available at the same site, but quite possible to overlook is
a page of Larry's own rambling on this topic:
http://kiev.wall.org/~larry/natural.html
well worth reading.
regards
andrew
------------------------------
Date: Thu, 09 Sep 1999 14:34:45 -0700
From: "Susan Malmrose" <susan@dietzdesign.com>
Subject: LWP for NT
Message-Id: <2IVB3.1992$FX.75790@news.uswest.net>
Can anyone tell me where I can download LWP for Windows NT? Can't find a
Windoze version anywhere.
Thanks,
Susan
susan@dietzdesign.com
Dietz Design Co.
80 S. Jackson #308
Seattle, WA 98104
206-621-1855
http://www.dietzdesign.com
------------------------------
Date: Thu, 09 Sep 1999 21:41:11 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: LWP for NT
Message-Id: <37dd292a.2226411@news.inet.tele.dk>
On Thu, 09 Sep 1999 14:34:45 -0700, "Susan Malmrose"
<susan@dietzdesign.com> wrote:
>Can anyone tell me where I can download LWP for Windows NT? Can't find a
>Windoze version anywhere.
Get perl from http://www.activestate.com, install it and fire up
ppm.pl and let it install lwp for you.
vh
Mads Toftum
---
Jeg har også hørt S. Jorvang sige: "Webfis er lidt sjovt"
------------------------------
Date: Thu, 09 Sep 1999 18:48:11 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: Mac Perl problems
Message-Id: <Arved_37-0909991848110001@dyip-11.chebucto.ns.ca>
In article <hzQB3.42$Gi.18457@news.exodus.net>, "Ian Murphy"
<ianm@raremedium.com> wrote:
> I have written a perl program to convert digits in filenames on the
> macintosh to hexidecimal so strange looking filenames will translate to the
> PC (stuff with * and \ and such). Unfortunately I can't get it to run
> properly using MacPerl. Specifically,
> it requires command line arguments, and while there is a command line
> function in Mac Perl (called One-liner) I don't know how to execute a script
> using this command line.
>
> If anyone could give me some tips on this it would be greatly appreciated.
Enter a command line exactly as you would on Unix, including the 'perl',
that is,
perl "path_to_script:script.plx" args
Arved
P.S. This is a little bit of a hassle sometimes, so checking for the value
of $^O and using things like MacPerl::Ask, MacPerl::Pick and
MacPerl::Choose if on the Mac can be more pleasant. And under MPW things
are even easier.
------------------------------
Date: Thu, 09 Sep 1999 14:52:08 -0700
From: designer@ricochet.net (Dan Poynor)
Subject: Re: Old Script Doesn't Like My New Perl? Help!
Message-Id: <designer-ya02408000R0909991452080001@news.ricochet.net>
I've tried the suggestions but have not been able to resolve this problem.
I do notice attempting to run my script is creating a tmp file like such...
tmp.2973 -> /home/httpd/foobar.com/slideshows/1250
which is a link to the correct directory in the array but it doesn't change
the name of the symbolic link named "current". It's like it's stuck for
some reason.
The script was working great until I installed RedHat6, previously I had
RedHat5.2 packages installed and ran it via a cron job.
Any other thoughts greatly appreciated!
Thanks,
DAN
In article <37d7b689.1425248@news.skynet.be>, bart.lateur@skynet.be (Bart
Lateur) wrote:
> Dan Poynor wrote:
>
> >[root@server hq]# perl -w /home/httpd/cgi-bin/rotate.pl
> >Use of uninitialized value at /home/httpd/cgi-bin/rotate.pl line 7.
> >
> >---------here's the script rotate.pl-------------
> >#! /usr/bin/perl
> >
> >$oldlink = readlink("/home/httpd/foobar.com/current");
> >@dirs = sort grep {!-l $_ && -d _} </home/httpd/foobar.com.com/slideshows/*>;
> >push(@dirs, $dirs[0]);
>
> As Abigail said: if @dirs is empty, $dirs[0] will be undefined.
>
> >for (1..@dirs) { $newlink = $dirs[$_] and last if $dirs[$_-1] eq $oldlink }
>
> But also, since you loop with $_ from 1 to the count of items in @dirs,
> $dirs[$_] may well be beyond the end of the array, thus, again:
> undefined.
>
> Are you sure you don't want
>
> for (1..$#dirs) { ... }
>
> ?
> >symlink($newlink, "tmp.$$");
>
> What if there isn't a match in the loop, for any of the array elements?
> Then, too, $newlink will be undefined.
>
> >rename("tmp.$$", "/home/httpd/foobar.com.com/current");
>
> --
> Bart.
------------------------------
Date: Thu, 9 Sep 1999 15:43:03 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Parsing tags?
Message-Id: <x3yhfl3hnw8.fsf@tigre.matrox.com>
m8100@abc.se (Bror Hellman) writes:
> Hello, I would need some help... :-(
>
> I have a large string containing one or more patterns of the type:
>
> <!-- art=XXX -->
>
> or
>
> <!-- ART="XXX" -->
>
>
> where XXX can be a string of any combination of one or more of
> these characters:
>
> [A-Z], [a-z], [0-9], [-+$!:.,;_%=*]
It seems that you want to match anything that is not a space or a
minus sign. Then something like this should do:
[^\s-]+
If you are guaranteed to have a space after your XXX, then you can
simplify things by using:
\S+
> Well.. now.. I need to first match every <!-- ART=XXX --> in this
> large string, get the XXX to process, and then substitute all my tags with
> something else according to what the argument was. And all matching must
> be case insensitive.
>
> Example:
>
> %artists = (
> 'VAN-GOGH' => 'ocean',
> 'REMBRANDT' => 'sea',
> );
>
> $large_string = 'My bonnie is over the <!-- ART="Van-GOGH" -->, '
> . 'my bonnie is over the <!-- art=rembrandt -->.';
$large_string =~ s/<!--\s+ART="?(\S+?)"?\s+-->/$artists{uc $1}/gi;
HTH,
--Ala
------------------------------
Date: Thu, 09 Sep 1999 17:49:14 -0400
From: Justin Smith <jsmith@mcs.drexel.edu>
Subject: Re: Perl fails tests
Message-Id: <37D82B5A.DC16B35C@mcs.drexel.edu>
dckinder@my-deja.com wrote:
> In article <37D7BE2B.DD8C5A6E@mcs.drexel.edu>,
> Justin Smith <jsmith@mcs.drexel.edu> wrote:
>
>
> This happens to me too. I am using the most recent version, 5.005_03,
> so the previous comments about getting an updated version are not
> helpful.
>
> I posted another message about this on this group. I have RedHat 6.0
> and its gcc. Just installed it 2 days ago. Also, GD:pm will not
> compile.
>
Yes --- I tried 5.005_03 with the newest version gcc and got the same problem.
I heard (on another newsgroup) that there's something wrong with the db library in Redhat, so I downloaded
the REAL Berkeley db implementation (from www.sleepycat.com) and tried to build BerkeleyDB.pm
(the Perl hook into the current Berkeley DB) and the resulting perl STILL failed the AnyDB test!
--
______________________________________________________________________
|
Time blows wildly against my door | Justin R. Smith
Stirring discarded sorrows | Department of Mathematics and
Like dead leaves of summers past | Computer Science
Memories of forgotten lore | Drexel University
Making way for new tomorrows | Philadelphia, PA 19104
New hopes, new fears, |
and new ways that last | Office: (215) 895-1847
|
c Justin R. Smith, March 14, 1994 | Fax: (215) 895-1582
My home page: http://www.mcs.drexel.edu/~jsmith
------------------------------
Date: Thu, 09 Sep 1999 17:10:39 -0400
From: Sushant Gargya <sushant@hindustan.vnet.net>
Subject: Perl ISAPI Not Working: script product no output
Message-Id: <37D8224F.2462A790@hindustan.vnet.net>
Hi everyone,
Currently we use perl for cgi scripts, but due to inordinate amount of
traffic, perl is taking too much of the server resources.
I read up on Perl Resource Kit and decided to use PERL ISAPI.
I think I have configured IIS 4.0 exactly what it suggests; however, I
have not had any luck. All I did was to add a mapping
within IIS 4.0 for the web-site in question. That is, I added a map to
files ending in plx to c:\perl\5.005\bin\mswin32-x86-object\perlis.dll
I then ran the script: (ie:
http://development/cgi/pathinfo.plx)
The output sent to the browser was:
'C:\Inetpub\e-plastic\cgi\pathinfo.plx' script produced no output
Any ideas/suggestions?? Please respond directly to sushant@ntwrks.com
Thanks
sushant
#### Begin Perl ISAPI Script: pathinfo.plx #####
use CGI qw/:standard/;
$query = new CGI;
print $query->header(), "\n\n";
print $query->start_html;
print "Path Info: $ENV{PATH_INFO}<P>";
$ENV{PATH_INFO} =~ s/^$ENV{SCRIPT_NAME}//;
print "Correct path info: $ENV{PATH_INFO}<p>";
print $query->end_html;
------------------------------
Date: 9 Sep 1999 20:58:28 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl/sendmail: encoding special chars
Message-Id: <7r971k$6fl$1@gellyfish.btinternet.com>
On Thu, 09 Sep 1999 10:14:55 GMT nikkk25@my-deja.com wrote:
> Hey everyone,
>
> maybe you can help me out on this one.
>
> When sending mail from a perl script (through sendmail), the special
> characters are garbled. Can anyone direct me to a script that encodes
> them appropriately?
>
You need to use the proper MIME encoding - there are modules on CPAN
that will help you with this.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 09 Sep 1999 14:52:33 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Premature end of script headers
Message-Id: <37D81001.833F1FBF@texas.net>
Jim wrote:
>
> Hi,
>
> Does anyone know what the error Premature end of script headers means?
>
> I moved a Perl cgi form script on to an Apache web server (1.3) running
> on Linux (5.2) and when I press the submit button, this is the error I
> get.
>
> I know the script works, because I've used it successfully before, and
> I've also had a few people look at it, and they say it's fine.
>
> I saw some discussion of this error in relation to Front Page, but I'm
> not using that.
>
> Any help would be appreciated.
>
> Thanks,
>
> Jim
You need to read 'The Idiot's Guide to Solving Perl CGI Problems'.
It's available on CPAN, and probably elsewhere. Here's the introductory
paragraph:
"If you're like most people on the newsgroup, you've presented us with
the clasiquísimo CGI problem: ``it doesn't work'', without providing us
sufficient background to divine what the real problem is. This is
infuriating, because is makes you come off like some drooling idiot
begging for free consulting help without having done any investigation
on your own part. This drives people away who could otherwise help you
and impoverishes the Net by exacerbating the already annoyingly low
signal-to-noise ratio."
HTH.
- Tom
------------------------------
Date: Thu, 9 Sep 1999 15:44:47 -0500
From: "Martin Bertolino" <martinb@talx.com.no.spam>
Subject: Re: Recursively Copy in NT?
Message-Id: <90VB3.294$Sb.2837@dfw-read.news.verio.net>
Use the xcopy command with the /S or /E arguments: xcopy source dest /S
Martin Bertolino
Robert J Perini <perini@acsu.buffalo.edu> wrote in message
news:7r8m17$r05$1@prometheus.acsu.buffalo.edu...
> I'm looking for an easy way to copy a series of directories like this:
>
> basedir
> --dir1
> --dir2
>
> I want to copy all of the basedir files and the ones below the directory.
If
> this was unix I'd be using
> cp with the -R switch. Please send email to me.
>
> Thanks in advance
> --
> Bob Perini
> Walkway Technology Node, SUNY Buffalo College
> Instructional Programmer
>
>
------------------------------
Date: Thu, 09 Sep 1999 16:12:25 -0400
From: Mark Conlin <Mark.Conlin@bridge.bellsouth.com>
Subject: server down or is code wrong.
Message-Id: <37D814A9.F9E82A5B@bridge.bellsouth.com>
Looking at an example I wrote this, the idea is to hit
the web server and see if it is running.
It does not appear to work
my $ua = new LWP::UserAgent;
$ua->proxy('http', 'http://proxy.bst.bls.com:8080/');
$ua->no_proxy('bst.bls.com');
$ua->agent("Mozilla/4.06 [en]");
$req = new HTTP::Request 'GET' => 'http://www.lens.bellsouth.com';
$req->header('Accept' => 'text/html');
$res = $ua->request($req);
if ($res->is_succes){
&debug("it worked server up");
} else {
&debug("it failed server down");
}
Thanks Mark
------------------------------
Date: Thu, 09 Sep 1999 16:31:03 -0400
From: Mark Conlin <Mark.Conlin@bridge.bellsouth.com>
Subject: Re: server down or is code wrong.
Message-Id: <37D81907.F5F7119C@bridge.bellsouth.com>
I had is_success, spelled wrong.
Sometimes you just stare and stare and it gets you nowhere.
:)
Mark
------------------------------
Date: 9 Sep 1999 20:37:31 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: setuid & real uid
Message-Id: <7r95qb$6fh$1@gellyfish.btinternet.com>
On 9 Sep 1999 15:09:05 GMT Coates Carter wrote:
> Is it possible to set the "real" uid that a script runs under?
>
Check out the variables $< and $> in the perlvar manpage and probably
the perlsec manpage too.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 9 Sep 1999 20:57:38 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: suggestion to revise grep (another Q: reference comparison)
Message-Id: <7r9702$cv3$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Sitaram Chamarty
<sitaram@diac.com>],
who wrote in article <slrn7tf8lr.n90.sitaram@diac.com>:
> But you ought to be able to compare them just as you copied them,
> and determine that their "values" (or referents) are equal. IOW -
> if you can "deepcopy" you should be able to "deep compare".
This is a widespread misconception. Read documentation of FreezeThaw
(or one of Tom's tutorials) why there are *two* different semantics of
deep-compare.
Ex: $a = \$a; $b = \$b;
Are $a and $b "the same"?
Ilya
------------------------------
Date: Thu, 09 Sep 1999 21:48:36 GMT
From: dhuang11@my-deja.com
Subject: taking a query from a web browser
Message-Id: <7r99vg$3eh$1@nnrp1.deja.com>
I have just finished up writing a simple web
server using Perl. However, there is a problem
with it. I can make it so that when I use
Netscape or IE to go to the URL for example:
http://www.test.com/food
My server will respond on port 80 and grabs a
page automatically. How do I read in the browser
query for in this example "food" and pass that
along to the perl daemon as a string. Any modules
take care of this problem? Thanks for any and all
responses.
Daniel Huang
Development Engineer - Redamo Ventures LLC
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 9 Sep 1999 19:45:19 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: tie()d hashes and scalar context
Message-Id: <7r92of$iq5$1@campus1.mtu.edu>
does anyone know what the rationale is behind the lack of a
TOSCALAR (or equivalent) method for tie()d hashes?
it seems to me that there is no reason that it shouldn't be
alterable the same way as the rest of the behavior of a
tie()d construct...if there is some glaring logic error in
my thinking, I'd appreciate knowing about it. :)
thanks for any comments,
Colin DeVilbiss
ps. if there is something in the docs to address this (or even something
which explicitly says ``a tied hash in scalar context evaluates to
"0"''), I'd like to hear about it. thanks again.
------------------------------
Date: 09 Sep 1999 16:46:29 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: tie()d hashes and scalar context
Message-Id: <x7g10nn78a.fsf@home.sysarch.com>
>>>>> "CRD" == Colin R DeVilbiss <crdevilb@mtu.edu> writes:
CRD> does anyone know what the rationale is behind the lack of a
CRD> TOSCALAR (or equivalent) method for tie()d hashes?
CRD> it seems to me that there is no reason that it shouldn't be
CRD> alterable the same way as the rest of the behavior of a
CRD> tie()d construct...if there is some glaring logic error in
CRD> my thinking, I'd appreciate knowing about it. :)
my eyes!! i can't see anymore! i was blinded by the glare!!!
i think you just need to check the calling context with wantarray. then
you return scalar or list results as needed.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 9 Sep 1999 21:01:08 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Win32::ODBC help
Message-Id: <7r976k$6fq$1@gellyfish.btinternet.com>
On Thu, 09 Sep 1999 06:31:36 -0400 Harlan Carvey, CISSP wrote:
> $stmt = "INSERT INTO ITEST1 (HostID,RegKey,Value,Data)".
> "VALUES ('$server','$rkey','$valkey','$value')";
There is an SQL syntax error in the contents of $stmt
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 09 Sep 1999 17:48:13 -0400
From: "Harlan Carvey, CISSP" <carvdawg@patriot.net>
Subject: Re: Win32::ODBC help
Message-Id: <37D82B1D.8AB610FF@patriot.net>
> > $stmt = "INSERT INTO ITEST1 (HostID,RegKey,Value,Data)".
> > "VALUES ('$server','$rkey','$valkey','$value')";
>
> There is an SQL syntax error in the contents of $stmt
Where? I've spelled everything correctly, there are 4 fields and 4 values, all
identified
correctly.
Carv
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 753
*************************************