[11816] in Perl-Users-Digest
Perl-Users Digest, Issue: 5416 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 19 07:12:35 1999
Date: Mon, 19 Apr 99 04:00:24 -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 Mon, 19 Apr 1999 Volume: 8 Number: 5416
Today's topics:
Re: A slight teaser....? (Larry Rosler)
Re: Active Perl and DDE problem <c4jgurney@my-dejanews.com>
Re: Adding TCPIP # <gellyfish@gellyfish.com>
Re: advanced perl? (Abigail)
Re: advanced perl? (Bart Lateur)
Any good perl2exe tools kjell.lonnqvist@nospam.evli.fi
Bath.pm Meeting <leon@netcraft.com>
Binary distribution of PERL <arribi@cesga.es>
Re: Binary distribution of PERL <wyzelli@yahoo.com>
Re: Binary distribution of PERL (David Efflandt)
Re: Can i run cgi in Win95 of my PC ?? <kai@sparc.spb.su>
Re: can't glob in Linux (David Efflandt)
directory/filename confusion on NT (perl bug?) <andrewm@ugsolutions.com>
help with Mail::Send <lucab@surf.it>
How does ${\(code)} work? <clint@drtech.co.uk>
Installation of Perl for Win32 w/o a C compiler <thimal@my-dejanews.com>
Re: iterating over hashes - how to get unique keys? (Steve Grantz)
Multiple submits on a CGI form <clint@drtech.co.uk>
Re: New FAQ: How can I read in an entire file all at on <Philip.Newton@datenrevision.de>
Re: New FAQ: How can I read in an entire file all at on (Jim Britain)
Re: Numeric String (Abigail)
Re: passing filehandles to functions (Bart Lateur)
Re: passing filehandles to functions (Abigail)
Re: Perl and the Windows API <ebohlman@netcom.com>
Re: Probs traversing a directory tree <luebbert@sfs-dortmund.de>
Re: Scripting language with LFN support? <harth@rz.uni-frankfurt.de>
Search engine on database davidcuny@yahoo.fr
signals on CGI <nicole@geodepth.com>
Re: signals on CGI (David Efflandt)
Starting an application from a CGI script on NT <paul.clough@bt.com>
strange problem with fork() <dennis@bilbo.iok.net>
Using a Regexp <wyzelli@yahoo.com>
Re: VB and Perl <Philip.Newton@datenrevision.de>
Re: warnings on Win32 <thimal@my-dejanews.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 19 Apr 1999 00:06:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: A slight teaser....?
Message-Id: <MPG.118475c15c327f7a9898d7@nntp.hpl.hp.com>
In article <7feias$bn4$1@autumn.news.rcn.net> on Mon, 19 Apr 1999
02:28:50 -0400, Pogeybait <pogeybait@erols.com> says...
...
> To get a count of the "/"s, try
>
> $cnt = $file =~ tr/\//\//;
Leaning Toothpick Syndrome alert!
$cnt = $file =~ tr%/%%;
> >2. Treat thefile so that each word which occurs within
> >it appears on a separate line, and write the results of this to a
> >file named file01.sline
>
> @words=split(/\//, $_);
> Then do a "foreach" on @words and write each word to the file.
Splitting on a slash has nothing to do with this problem.
> >3. Once each words appears on a separate line, compare file01.sline
...
Blindly quoting the next 40 or so lines when you have no comment on them
is a gratuitous waste of bandwidth.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 19 Apr 1999 07:55:51 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: Active Perl and DDE problem
Message-Id: <7feni4$nkp$1@nnrp1.dejanews.com>
In article <7f772r$i4s$1@nnrp1.dejanews.com>,
feketeroland11@my-dejanews.com wrote:
> Can anybody help me about AP DDE? Please - if aviable - send me some script
> code. I want to use it with Symantec WinFax. (WinFax DDE is working! from
> Visual Basic.) It's send me a message: Unable to initiate conversation. I use
> the following code - based on the help:use Win32::DDE::Client; $Client
= new
> Win32::DDE::Client ('C:\Program files\Symantec\WinFax\FAXMGR32.exe',
> 'TRANSMIT); die "Unable to initiate conversation" if $Client->Error;
> $Client->Disconnect; Thanks for the time. Fekete Roland
'C:\Program files\Symantec\WinFax\FAXMGR32.exe' contains a space - a lot of
functions seem to object to this.
Use 'C:\Progra~1\Symantec\WinFax\FAXMGR32.exe' instead, no guaranties but it
might work.
HTH,
Jeremy Gurney
SAS Programmer | Proteus Molecular Design Ltd.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 19 Apr 1999 11:34:48 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Adding TCPIP #
Message-Id: <371b06c8@newsread3.dircon.co.uk>
Wyzelli <wyzelli@yahoo.com> wrote:
> I have a short Perl script which parses a file and extracts information
> which is incremented to three arrays by key $user.
>
<snip>
> A sample of the file to be parsed is below.
>
> Wed Mar 31 18:10:17 1999
> Acct-Session-Id = "0F00007B"
>
Hmm, Radius. Appalling logfile output. I thought I had a program that
does exactly (or nearly) what you wanted however I discovered it was a shell
script and not exactly something you would show in front of the children.
Anyhow to match dotted quad IP number you could use:
/(d+\.d+\.d+\.d+)/
On a more general note what we do with this stuff is hack it around a bit
to remove duplicates and create a '|' separated file that is then loaded
into a MySQL database on a different server - bear in mind that these logs
can get huge - and thus we can create reports without worrying about the
nasty file format.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 19 Apr 1999 08:11:19 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: advanced perl?
Message-Id: <7feof7$55m$2@client2.news.psi.net>
Dunn One (obinani@popd.ix.netcom.com) wrote on MMLVII September MCMXCIII
in <URL:news:7fej5p$bo@sjx-ixn1.ix.netcom.com>:
\\ Does anybody have any suggestions for learning advanced perl? If so, please
\\ helpth
How advanced is advanced? I guess that depends from person to person....
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: Mon, 19 Apr 1999 08:15:57 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: advanced perl?
Message-Id: <371de425.2664576@news.skynet.be>
Dunn One wrote:
>Does anybody have any suggestions for learning advanced perl? If so, please
>helpth
There's a book available called "Advanced Perl Programming". How
appropriate. Also known as "the Panther book". And rest assured: it's
from O'Reilly. Most authoritive Perl books are.
Bart.
------------------------------
Date: Mon, 19 Apr 1999 10:02:42 GMT
From: kjell.lonnqvist@nospam.evli.fi
Subject: Any good perl2exe tools
Message-Id: <371afcaf.11126198@news.eunet.fi>
I've been looking for tools to convert perl-scripts to .exe files
that works under Windows NT. So far I have found one tool perl2exe by
demobuilder are there any other tools out there?
------------------------------
Date: Mon, 19 Apr 1999 09:06:51 +0000
From: Leon Brocard <leon@netcraft.com>
Subject: Bath.pm Meeting
Message-Id: <371AF22B.7DD94287@netcraft.com>
Hello everyone in the Bath/Bristol area.
Bath Perl Mongers is meeting again on Wednesday, as we do every
Wednesday.
As our webpage <URL:http://bath.pm.org/> points out:
> We meet (very informally) at The Hobgoblin in Saint James's
> Parade, Bath, every Wednesday from 6pm. Come and join us!
Yes, weekly meetings. *Another* excuse to go to the pub and
have a nice meal later on ;-)
Come and ask us your trickiest Perl questions - if we get
stumped, I'll buy you a beer[1] (or whatever you're drinking)
Leon
[1] Up to a reasonable[2] limit, that is
[2] ie one ;-)
--
Leon Brocard................................http://bath.pm.org/
leon@netcraft.com........................http://www.astray.com/
... Useless invention no. 404: Brake oil
------------------------------
Date: Mon, 19 Apr 1999 10:25:28 +0200
From: =?iso-8859-1?Q?Jes=FAs?= Arribi Vilela <arribi@cesga.es>
Subject: Binary distribution of PERL
Message-Id: <371AE877.69A3C8CB@cesga.es>
Hi,
Where can I download a binary distribution of Perl 5 for Windows NT
Server 4.0?
Thanks,
Jeszs
------------------------------
Date: Mon, 19 Apr 1999 18:00:02 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Binary distribution of PERL
Message-Id: <eQBS2.3$4x2.378@vic.nntp.telstra.net>
http://www.activestate.com/
Wyzelli
Jeszs Arribi Vilela wrote in message <371AE877.69A3C8CB@cesga.es>...
>Hi,
>
>Where can I download a binary distribution of Perl 5 for Windows NT
>Server 4.0?
>
>Thanks,
>
>Jeszs
>
------------------------------
Date: Mon, 19 Apr 1999 05:41:16 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Binary distribution of PERL
Message-Id: <slrn7hlun8.1gt.efflandt@efflandt.xnet.com>
On Mon, 19 Apr 1999 10:25:28 +0200, Jeszs Arribi Vilela <arribi@cesga.es> wrote:
>Hi,
>
>Where can I download a binary distribution of Perl 5 for Windows NT
>Server 4.0?
You might want to try http://www.perl.com/
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Mon, 19 Apr 1999 10:44:50 +0400
From: "Arzhan I. Kinzhalin" <kai@sparc.spb.su>
Subject: Re: Can i run cgi in Win95 of my PC ??
Message-Id: <Pine.GSO.4.02.9904191040260.15309-100000@minerva.sparc.spb.su>
->: Because, i want to test the cgi program wriiten by myself before
->: upload the cgi to server.
->
->
-> You must have an HTTP server installed to do CGI.
->
I want just note that installing http server is not a reqiurement: perl (5.005 I
guess) does have offline-mode which is helpful to test CGI scripts written in
perl without httpd. But you'll get tired of typing parameter values each time
you run a script. :)
HTH,
xcore
------------------------------
Date: Mon, 19 Apr 1999 05:55:04 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: can't glob in Linux
Message-Id: <slrn7hlvh3.1gt.efflandt@efflandt.xnet.com>
On Mon, 19 Apr 1999 04:52:10 GMT, jbusco@my-dejanews.com
<jbusco@my-dejanews.com> wrote:
>I'm a newbie to perl and linux, but enthusiastically learning.
>I'm going through the Llama book "Learning Perl". There is a
>really simple exercise to change to a directory and list the
>files in that directory through globbing. It doesn't work on
>my RedHat 5.0 system!
Works for me in RedHat 5.2 with bash or csh. Make sure that the first
line is all the way to the left margin. You didn't edit this in
Windows did you? 8-)
If you haven't learned vi yet, there is an easy to used editor with the
pine package called 'pico'. In fact it can clear up those nasty DOS
carriage returns by just doing a space, backspace, then save the file.
>Here's the script:
>
> #!/usr/bin/perl -w
>
> print "Where to? ";
> chomp($newdir = <STDIN>);
> chdir($newdir) || die "Cannot chdir to $newdir: $!";
> foreach (<*>) {
> print "$_\n";
> }
>
>And here's the output:
>
> $ perl -w answer.pl
> Where to? /bin
> shell-init: could not get current directory: getwd: cannot access parent
>directories
> [followed by a listing of all the files in my HOME directory, not /bin!]
>
>Can anyone explain to me why this simple code doesn't work? Does it have
>anything to do with perl relying on csh, but Linux's csh is really a link
>to tcsh?
>
>Thanks,
>
>John
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Mon, 19 Apr 1999 11:30:50 +0100
From: Andrew Maguire <andrewm@ugsolutions.com>
Subject: directory/filename confusion on NT (perl bug?)
Message-Id: <371B05DA.B17@ugsolutions.com>
I'm using 5.004_02 on NT and have found 2 cases of Perl
incorrectly thinking that adirectory is a file.
It only occurs when the directory path is using the format:
\\MACHINE\share\directory\subdirectory
One case I have is if \\MACHINE\share\directory\subdirectory exists
in @INC and I do require 'subdirectory' becasue I happen to have a file
called subdirectory elsewhere in the @INC path then perl returns
file does not end with 1;. Obvious workaround change the filename
(a pain but simple).
Also doing a test like ( -d \\MACHINE\share\directory\subdirectory )
fails although ( -d \\MACHINE\share\directory\subdirectory\. )
may be an adequate work around - I have not tried it.
Is it a known bug in Perl or is it a more fundemental NT bug
does anyone know as I am curious.
Andrew Maguire
------------------------------
Date: Sun, 18 Apr 1999 08:45:59 +0200
From: luca <lucab@surf.it>
Subject: help with Mail::Send
Message-Id: <37197FA7.1184@surf.it>
Please, can you help me?
I tried to use the perl module Mail::Send
in the following way:
#!/usr/bin/perl
use Mail::Send;
$mail = new Mail::Send Subject => "question" , To =>
"lucab\@surf.it";
$fh = $mail->open;
print $fh "how can I... ";
$fh->close;
but it returns to me the following e-mail:
Return-Path: <nobody>
Date: Sat, 17 Apr 1999 13:41:05 -0700
From: Nobody <nobody>
To: lucab@surf.it
X-Censor-LoC: -1
~s question
how can I...
also with null subject.
WHY ??
And how can I specify the "from" field too?
Please, mail me at lucab@surf.it
Thanks alot. Luca
------------------------------
Date: Mon, 19 Apr 1999 11:30:35 +0100
From: "Clinton Gormley" <clint@drtech.co.uk>
Subject: How does ${\(code)} work?
Message-Id: <7ff08q$dr1$1@taliesin.netcom.net.uk>
I I use this feature all the time :
print "Text text text ${\((foo==bar)?'abc':'def')}";
and it works a treat, But how does it work?
What does the ${\()} bit do?
Clint
------------------------------
Date: Mon, 19 Apr 1999 08:16:56 GMT
From: Thimal <thimal@my-dejanews.com>
Subject: Installation of Perl for Win32 w/o a C compiler
Message-Id: <7feopj$ois$1@nnrp1.dejanews.com>
Hi, I'm pretty new to Perl, but I find that it is an excellent language for
most things that took me ages to do on C, but sadly, the place that I have
access to Unix Perl, won't allow me to install my own packages... which is
kinda irritating, especially when I want to experiment with stuff... so I
picked up on ActiveState Perl build 515 for Win32... then I went on and found
out about Tk... and at about that time, I also installed Gurusamy Sarathy's
Win32 port of Perl 5.004_02 on my machine... this has Tk and some other nice
modules besides... but the problem is this.... I don't have access to any of
the C compilers that are required for building Perl from source, so I have to
rely on binary versions.. but this means that I don't have the latest
versions of Win32 Perl.... and nor will I get most of the important
modules... like Tk 8x, and the later versions of DBI and the DBD drivers...
Can anyone please point me to binaries of Win32 perl that are a bit more
recent than the versions above... ? Thanks in advance.. I've checked some
CPAN sites, and been to Perl.com, but to no avail....
Thimal PS : The main reason for still using the GS port of Perl is because
the excellent Win32::GUI module is as yet unsupported by the Activestate
build.. :o)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 19 Apr 1999 07:52:16 GMT
From: sgrantz@visi.com (Steve Grantz)
Subject: Re: iterating over hashes - how to get unique keys?
Message-Id: <QgBS2.239$tE2.38313@ptah.visi.com>
mel@purdue.edu (mudin@expert.cc.purdue.edu) wrote:
[snip]
: foreach $file (@filelist) {
: # now, i want to store the value of the checksum, i.e $d
: # that is computed into a hash, so that i can use it later,
: # but my subsequent attempts only store the value of the
# last file.
[snip]
: }
Mel, you gave us all your code except the part not working! But your
documentation is good, so I'll try taking a guess.
Since only the last file name hangs around, there must be a problemm
with how you assign or retrieve hash entries.
Try
$thishash{$filename} = $checksum;
and read perldata to learn more about hashes.
Without the exact code of how you use the hash, there isn't much
more I can say. (OK, and even if I had that, I really don't know shit).
-Steve
--
I despise those 'God Speaks' billboards.
That's why Satan Speaks at
http://www.visi.com/~sgrantz
------------------------------
Date: Mon, 19 Apr 1999 11:40:42 +0100
From: "Clinton Gormley" <clint@drtech.co.uk>
Subject: Multiple submits on a CGI form
Message-Id: <7ff0rp$dtt$1@taliesin.netcom.net.uk>
Many months ago this was the subject of a thread on this newsgroup.
The problem was :- if somebody presses the submit button twice, how do you
prevent the server processing the request twice, which may involve you
buying two copies of a book etc
The answer given was: build in a delay so that, after receiving the first
request, no more requests would be accepted until a certain time had
elapsed.
This is not a satisfactory answer as, while the server would only process
one request, the user would get the non-processed submission, and would
lose the thread of his original request ie
Normal:
Form
|
|Press Submit
|
\/
Thanks for submitting
Problem situation
Form
|
|Press Submit
|
|
|Press Submit again
\/
Your order is being processed already
but now there is no way of getting to the
Thanks for submitting stage
What would be optimal would be to be able to join the script that gives the
"Your order is being processed" message to the original script doing the
processing so that the end result is the same no matter how many times you
press submit.
Any ideas about how to achieve this?
And before anybody says that this should be a CGI question - I disagree.
Tis the power of Perl that would allow us to achieve the above!
Thanks
Clint
------------------------------
Date: Mon, 19 Apr 1999 11:35:27 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: New FAQ: How can I read in an entire file all at once?
Message-Id: <371AF8DF.14DC289E@datenrevision.de>
Jim Britain wrote:
>
> comp.lang.perl.moderated:
> Subject: PFR: read_file, write_file
> Author: Uri Guttman <uri@sysarch.com>
Approximate date?
Cheers,
Philip
------------------------------
Date: Mon, 19 Apr 1999 10:38:47 GMT
From: jbritain@home.com (Jim Britain)
Subject: Re: New FAQ: How can I read in an entire file all at once?
Message-Id: <371b0780.104426352@news>
On Mon, 19 Apr 1999 11:35:27 +0200, Philip Newton
<Philip.Newton@datenrevision.de> wrote:
>Jim Britain wrote:
>>
>> comp.lang.perl.moderated:
>> Subject: PFR: read_file, write_file
>> Author: Uri Guttman <uri@sysarch.com>
>
>Approximate date?
1. 99/02/17 020 Re: PFR: read_file, write_fi comp.lang.perl.modera Uri Guttman
2. 99/02/16 020 Re: PFR: read_file, write_fi comp.lang.perl.modera Uri Guttman
3. 99/02/15 020 Re: PFR: read_file, write_fi comp.lang.perl.misc Uri Guttman
4. 99/02/15 020 Re: PFR: read_file, write_fi comp.lang.perl.misc Uri Guttman
5. 99/02/15 020 Re: PFR: read_file, write_fi comp.lang.perl.modera Uri Guttman
6. 99/02/17 019 Re: PFR: read_file, write_fi comp.lang.perl.modera Uri Guttman
7. 99/02/12 019 PFR: read_file, write_file comp.lang.perl.misc Uri Guttman
------------------------------
Date: 19 Apr 1999 08:10:23 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Numeric String
Message-Id: <7feodf$55m$1@client2.news.psi.net>
Larry Rosler (lr@hpl.hp.com) wrote on MMLVII September MCMXCIII in
<URL:news:MPG.11846a9c9175d0cc9898d4@nntp.hpl.hp.com>:
() In article <7fdr32$2c3$1@client2.news.psi.net> on 18 Apr 1999 23:49:54
() GMT, Abigail <abigail@fnx.com> says...
() > Tom Christiansen (tchrist@mox.perl.com) wrote on MMLVI September MCMXCIII
() > in <URL:news:371a2719@cs.colorado.edu>:
() > ## Frank de Bot <debot@xs4all.nl> writes:
() > ## :How can I detect whether a string is numeric or not. I know it's some
() > ## :where in the faq's but I couldn't find it anymore.
() > ##
() > ## YOU CAN'T FIND THE FAQS?
() >
() > That's not what he said.
()
() So let's be kind and aim him at the end of perlfaq4 (in the section
() Data:Misc, not in the first section, Data:Numbers): "How do I determine
() whether a scalar is a number/whole/integer/float?"
Tom already pointed him to perlfaq4, IIRC.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: Mon, 19 Apr 1999 08:05:49 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: passing filehandles to functions
Message-Id: <371ce2fd.2367706@news.skynet.be>
Dunn One wrote:
>passing filehandles to functions
perldoc perlfaq5
"How can I make a filehandle local to a subroutine? How do I pass
filehandles between subroutines? How do I make an array of
filehandles?"
>I know how to do this for reading, but how do you do this for writing? Any
>suggestions would be appreciated.
You can always do:
select $handle;
where $handle may even be a string. Anything you print(), goes to that
handle.
Bart.
------------------------------
Date: 19 Apr 1999 08:13:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: passing filehandles to functions
Message-Id: <7feojo$55m$3@client2.news.psi.net>
Dunn One (obinani@popd.ix.netcom.com) wrote on MMLVII September MCMXCIII
in <URL:news:7fej82$e6@sjx-ixn1.ix.netcom.com>:
"" I know how to do this for reading, but how do you do this for writing?
*boggle* Which port/version of Perl has different filehandles for
reading and writing?
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Mon, 19 Apr 1999 07:07:47 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Perl and the Windows API
Message-Id: <ebohlmanFAFD50.6JD@netcom.com>
Scott W <swolfington@home.com> wrote:
: Hi! I was wondering if there is a way to call Windows API functions
: from within Perl? Is this possible? Thanks in advance!
Yep, using the Win32::API module.
------------------------------
Date: Mon, 19 Apr 1999 11:04:00 +0200
From: Dorthe Luebbert <luebbert@sfs-dortmund.de>
Subject: Re: Probs traversing a directory tree
Message-Id: <371AF180.DC4767A9@sfs-dortmund.de>
> You REALLY should probably be using the File::Find module for this.
Hm. Good idea for all systems except Novell. Novell has problems with
modules, even standard modules do not work... :-(
Dorthe
------------------------------
Date: Mon, 19 Apr 1999 08:39:05 +0000
From: Alexander Harth <harth@rz.uni-frankfurt.de>
Subject: Re: Scripting language with LFN support?
Message-Id: <371AEBA9.F78C8042@rz.uni-frankfurt.de>
amacleod@altavista.net wrote:
>
> My question is quite simple:
> Is there a scripting language in NT
> (akin to shell, batch, perl etc.) that
> supports long file names?
>
> NT's DOS CLI only supports long file
> names for built in commands (cd, md, rd,
> copy, ren, dir, type...) which makes it worthless.
>
> I'm hoping to write platform independent
> install scripts that can manage files
> on both NT and UNIXwith minimal change.
I think perl is the best way to do it.
Yours
Alexander
------------------------------
Date: Mon, 19 Apr 1999 08:58:25 GMT
From: davidcuny@yahoo.fr
Subject: Search engine on database
Message-Id: <7fer7f$qdl$1@nnrp1.dejanews.com>
Hello,
I'm doing an Intranet Web site with a database (Apache, DB2 and NT).
I'd like to realize a quite complex search engine on the database :
- the user enters mutli keywords
- there exists a table of non significant words
- there exists a table of words that have meaning: "kind" and "sort"
Where can I find an algorithm or, the best, Perl code for that kind of work?
Is Perl the good tool to do that (Python??,java)??
thanks
David
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 19 Apr 1999 08:22:23 +0200
From: nicole <nicole@geodepth.com>
Subject: signals on CGI
Message-Id: <371ACB9F.21F110C5@geodepth.com>
Hello,
I have a script that amends a data file on the server, I want to ensure
that
if the user presses the stop button the data file is not going to be
corrupted. Within a script, run from the command line, the following
would
catch an interrupt.
MAIN:
{
.....
$SIG{'INT'} = \&cleanup;
$SIG{'HUP'} = \&cleanup;
$SIG{'QUIT'} = \&cleanup;
.....
}
sub cleanup()
{
print "<H4>Cleanup()</H4>\n";
exit 1;
} # End of cleanup
But this does not work in a CGI script. Does anyone know if the
interrupts
can be caught and if so how?
If not, is there any other way that this can be dealt with?
Thanks, Nicole.
------------------------------
Date: Mon, 19 Apr 1999 06:17:30 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: signals on CGI
Message-Id: <slrn7hm0r4.1gt.efflandt@efflandt.xnet.com>
On Mon, 19 Apr 1999 08:22:23 +0200, nicole <nicole@geodepth.com> wrote:
>Hello,
>
>I have a script that amends a data file on the server, I want to ensure
>that if the user presses the stop button the data file is not going to be
>corrupted. Within a script, run from the command line, the following
>would catch an interrupt.
>
>MAIN:
>{
> .....
> $SIG{'INT'} = \&cleanup;
> $SIG{'HUP'} = \&cleanup;
> $SIG{'QUIT'} = \&cleanup;
> .....
>}
>
>sub cleanup()
>{
> print "<H4>Cleanup()</H4>\n";
> exit 1;
>
>} # End of cleanup
>
>But this does not work in a CGI script. Does anyone know if the
>interrupts can be caught and if so how?
>If not, is there any other way that this can be dealt with?
>
>
>Thanks, Nicole.
I think the stop button on a browser merely stops receiving information,
it does not send a signal. The webserver stops sending if there is no
receiver and the perl script dies when it tries to write to STDOUT that no
longer exists. But the server buffers info before it even tries to send
it, so this is not likely to be a problem unless you are trying to do
server push in the middle of saving the data.
Just make sure that you flock the file you open, and don't print to STDOUT
while saving the data.
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Mon, 19 Apr 1999 10:17:16 +0100
From: Paul Clough <paul.clough@bt.com>
Subject: Starting an application from a CGI script on NT
Message-Id: <371AF49C.5B73C2FE@bt.com>
I am trying to start a Windows application from within Perl script under
NT. I am using the IIS4.0 and the Win32::Process package. I can get the
application process to start, but I don't actually get any application
appear on the server machine. Is this a security limitation or do I have
to do something with the server to get the application to run?
Thanks,
Paul.
------------------------------
Date: Mon, 19 Apr 1999 12:02:35 +0200
From: Dennis Wetzig <dennis@bilbo.iok.net>
Subject: strange problem with fork()
Message-Id: <371AFF3B.8B436788@bilbo.iok.net>
Hi,
I wrote the following piece of code to explain my problem:
----
$count=0;
while($count<2)
{
if($pid=fork())
{
print "Parent here...\n";
}
elsif(defined($pid))
{
print "Child here...\n";
exit(0);
}
$count++;
}
exit(0);
-----
If I execute that program I get the following output:
Parent here...
Child here...
Child here...
Parent here...
That is right what I expected. But whenever I pipe the output into a
file,
the file includes:
Child here...
Parent here...
Child here...
Parent here...
Parent here...
You agree that this is one line more than I should expect, right?
Well, I am clueless how to explain that. If you are not, then please
let me know ;-)
I am using perl 5.002 on digital unix.
Thanks for you help!
Dennis
P.S.: It would be great, if you could send me a copy of your answer to
dennis@bilbo.iok.net
------------------------------
Date: Mon, 19 Apr 1999 17:34:09 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Using a Regexp
Message-Id: <ZrBS2.1$4x2.319@vic.nntp.telstra.net>
I have a short Perl script which parses a file and extracts information
which is incremented to three arrays by key $user.
The items extracted are all numeric (time, Octets in, Octets out). This is
the segment of the code which extracts the data I need. The script reads a
paragraph at a time as per the sample below.
if (/User-Name = "([^"]+)"/) {
$user = $1;
if (/Acct-Session-Time = (\d+)/) {
$elapsed = $1;
/Acct-Input-Octets = (\d+)/;
$input = $1;
/Acct-Output-Octets = (\d+)/;
$output = $1;
$used{$user} += $elapsed;
$input{$user} += $input;
$output{$user} += $output;
}
}
Can anyone tell me what regexp I should use to extract the IP number from
the appropriate field (Framed-IP-Address)? I cannot find any reference to
IP address in the regexp FAQ (perlfaq6) and am still very much a newbie at
this.
I want to use essentially the same information as in the program above only
output it to a log file by session rather that the cumulative totals I am
achieving above.
A sample of the file to be parsed is below.
Wed Mar 31 18:10:17 1999
Acct-Session-Id = "0F00007B"
User-Name = "user"
NAS-IP-Address = 203.39.3.130
NAS-Port = 5
NAS-Port-Type = Async
Acct-Status-Type = Stop
Acct-Session-Time = 12
Acct-Authentic = RADIUS
Connect-Info = "48000 MNP/NONE"
Acct-Input-Octets = 2329
Acct-Output-Octets = 8
Called-Station-Id = "89461300"
Acct-Terminate-Cause = User-Request
Vendor-Specific = ""
Service-Type = Framed-User
Framed-Protocol = PPP
Framed-IP-Address = 203.39.3.170
Acct-Delay-Time = 0
Timestamp = 922869617
Request-Authenticator = Unverified
Also is anyone interested in giving me some rates for Perl/CGI programming?
TIA
Wyzelli
reply to NG is fine or e-mail
------------------------------
Date: Mon, 19 Apr 1999 12:49:23 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: VB and Perl
Message-Id: <371B0A33.98B65702@datenrevision.de>
Brad Hilton wrote:
>
> How can I integrate Perl into VB?
No need to ask in quintuplicate; this isn't the civil service, you know.
Cheers,
Philip
------------------------------
Date: Mon, 19 Apr 1999 08:04:33 GMT
From: Thimal <thimal@my-dejanews.com>
Subject: Re: warnings on Win32
Message-Id: <7feo2e$o15$1@nnrp1.dejanews.com>
I run Perl (5.004_02) on a WinNT 4.0 cmd box and I never use the -w switch on
the command line... I always use the shebang line with -w, and I get the
warnings just fine...
to me, it makes sense to have the switches on a shebang line, and not have to
worry about changing stuff when you punch in the command line.... so I'm happy
that it works... :o)
Thimal
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5416
**************************************