[11078] in Perl-Users-Digest
Perl-Users Digest, Issue: 4678 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 18 11:27:27 1999
Date: Mon, 18 Jan 99 08:17:27 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 18 Jan 1999 Volume: 8 Number: 4678
Today's topics:
ActiveX or Java for E-Commerce Applications arkiernan@maths1.kst.dit.ie
Re: append to beginning of file (Tad McClellan)
Array slices with a maximum length (Bart Lateur)
calling a script olivier.blanchard@geis.ge.com
Re: CPAN useful from behind a firewall ? ( NEIL LOVELY)
Re: determine, if file is directory (Patrick Clauberg)
Re: determine, if file is directory (Larry Rosler)
Re: Email notification <simsi_NO_SPAM@hotmail.com>
Re: GD.pm NOT WORKING! bryf128@my-dejanews.com
Re: glob error <giese@dkrz.de>
Re: HELP: Writing Date/Time to Log <ravn@dit.ou.dk>
Re: How to DEBUG perl inside other program (Tad McClellan)
Re: How to get IP address of a local machine under NT (David Cantrell)
Re: how to return HTML to a specific frame <simsi_NO_SPAM@hotmail.com>
I forgot <Joe@rhein.to>
Re: kwlii: Formatting numbers in Perl ? (Tad McClellan)
local copy of specified url <peromaric@yahoo.com>
Re: local copy of specified url <ebohlman@netcom.com>
Re: logging hits remotely <simsi_NO_SPAM@hotmail.com>
Re: Making perl do tasks at specific times.. <simsi_NO_SPAM@hotmail.com>
Memory management using reference <cobalt@dircon.co.uk>
Re: Memory management using reference (Sean McAfee)
Re: Need help deciphering code <staffan@ngb.se>
perl script to log no of visitors to website <rcarter@binaryvision.com>
Perl Web browser problem <rmartens@nmsmedia.nl>
Problem : Start stop NT service <nrd1mmc@nrd.ups.com>
problem displaying images via perl cgi script- Pls Help Eadmund@writeme.com
Re: protecting scripts (Tad McClellan)
Re: Running a PERL program on NT <aspinelli@ismes.it>
Re: Secuity hole with perl (suidperl) and nosuid mounts <matthew.sergeant@eml.ericsson.se>
Re: Secuity hole with perl (suidperl) and nosuid mounts <o.mercader@cesca.es>
splitting file using eof question <hamptonk@bible.org>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 18 Jan 1999 15:33:31 GMT
From: arkiernan@maths1.kst.dit.ie
Subject: ActiveX or Java for E-Commerce Applications
Message-Id: <77vk8a$pva$1@nnrp1.dejanews.com>
I am a final BSc. computer science, my final year thesis is a
comparison of ActiveX and Java for the development of E-Commerce
applications.
As part of this thesis I am surveying the opinion of
E-Commerce developers on the abilities of ActiveX and Java
as a means of developng E-Commerce applications.
As a perl user myself and find it to be a successful means of developing web
applcations, I am particukarly interested in the opinions of perl users in
this aspect.
As such, I would be extremely grateful if anyone out there
would taks the time ( 5 minutes aprox, depending on the detail
of your comments) to answer a small questionaire.
The questionaire is available at
http:\\ganymede.kst.dit.ie\arkiernan\questionaire\index.asp
My results will be taken a sum of all the reponses, so no
direct persons or comments wil be refered to or implied upon
in my thesis.
I greatly appreciate the time anyone takes to participate in this survey.
Thanking you in advanced,
Alan Kiernan
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 08:17:16 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: append to beginning of file
Message-Id: <cpfv77.ci6.ln@magna.metronet.com>
Uri Guttman (uri@home.sysarch.com) wrote:
: not only is this an FAQ but the stupid oxymoron "append to beginning of
: a file" is actually mentioned in the title of this FAQ. how convenient!
This has been mentioned here before. It seemed so strange that
I actually remembered it.
"append" does not imply any particular position, though common
usage seems to imply "at the end".
My Websters says:
1: attach, affix
2: to add as a supplement or appendix
No mention of _where_ it is attached.
Then for "appendix" it says, in part: "usually attached at the end"
^^^^^^^
"stupid oxymoron" _is_ a redundancy though.
But that's fine, 'cause Larry says that redundancy is OK:
[ Message-ID: <71npil$lo4@kiev.wall.org>
From: larry@kiev.wall.org (Larry Wall)
Newsgroups: comp.lang.perl.misc
Subject: Re: PERL is TOO flexible
Date: 3 Nov 1998 12:37:41 -0800
He also mentioned it in the '97 Perl Conference keynote.
]
heh, heh...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 12:10:07 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Array slices with a maximum length
Message-Id: <36a51f0f.14446648@news.skynet.be>
Situation: I have a CGI search engine, where the results are stored into
an array. I only include part of this result at a time, e.g. at most 10
results. That is pretty common, I think. ;-)
But, I've bumped into a little Perl probelm. I'm not pleased with my
solution. Are there better alternatives?
Example source:
@result = ('A' .. 'Z'); # 26 entries
$slice = 10; # 10 at a time
$page = 2; # start at 20
@slice = @result[$page*$slice .. ($page+1)*$slice-1];
The problem is that once you get past the end of the original array, you
get extra undefined values as fills at the end of the array. Try:
print "\[@slice\]\n";
under -w, and you'll see what I mean.
My current solution is an additional grep:
@slice = grep { defined }
@result[$page*$slice .. ($page+1)*$slice-1];
Are there better alternatives, i.e. one where the undefined fill values
are simply not generated? (Note that @result needn't even be an array:
it could be a function returning an array, too.)
p.s. I don't understand why there are twice as many warnings than there
are undefined values. I get 8 warnings on the above sample. I get only 4
if I just { print @slice; }
Bart.
------------------------------
Date: Mon, 18 Jan 1999 15:01:13 GMT
From: olivier.blanchard@geis.ge.com
Subject: calling a script
Message-Id: <77vibj$oc8$1@nnrp1.dejanews.com>
Hello everybody,
I have a problem : I want to call a script (B.pl) from another one (A.pl), I
tried this :
in A.pl I coded do B.pl so it worked fine unless I want some arguments to be
passed to B.pl then I did : do B.pl arg1 arg2 .... and the script B.pl is not
running, why?
Thanks in advance for your help.
Olivier
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 18 Jan 1999 12:21:19 GMT
From: nl012@un.seqeb.gov.au ( NEIL LOVELY)
Subject: Re: CPAN useful from behind a firewall ?
Message-Id: <77v900$as22@inet6.citec.com.au>
NEIL LOVELY (nl012@un.seqeb.gov.au) wrote:
: I have to perform the following machinations to ftp to ftp.perl.org
: from work where I am behind a firewall
: 12:36pm =>ftp proxy 1687
: Connected to proxy.seqeb.gov.au.
: 220-
: 220- <====================================>
: 220- --ooOoo--
: 220- You are passing through
: 220- the SEQEB FTP Gateway
: 220- --ooOoo--
: 220- <====================================>
: 220
: Name (proxy:nl012): anonymous@ftp.perl.org
: 331-(----GATEWAY CONNECTED TO ftp.perl.org----)
: 331-(220 ProFTPD 1.1.7pl3 Server (ProFTPD) [defender.perl.org])
: 331 Anonymous login ok, send your complete e-mail address as password.
: Password:
: 230 Anonymous access granted, restrictions apply.
: ftp>
: CPAN.pm seems unable to cope with the above scenario so I am currently
: unable to pull modules from ftp.perl.org using CPAN.pm. Anyone know of a
: workaround ?
I solved the problem myself by setting the environment variable
FTP_FIREWALL used by Net::FTP to proxy.seqeb.gov.au:1687
--
Neil Lovely |
Computer Support Engineer | e-mail : nl012@un.seqeb.gov.au
South East Queensland Electricity Board | Phone : +61 7 223 4256
GPO Box 1461 Brisbane Q 4001 Australia | Fax : +61 7 221 7556
------------------------------
Date: Mon, 18 Jan 1999 11:56:30 GMT
From: pat@uni.de (Patrick Clauberg)
Subject: Re: determine, if file is directory
Message-Id: <369dcb0a.316799@129.217.240.1>
On 14 Jan 1999 04:38:51 GMT, abigail@fnx.com (Abigail) wrote:
Ok, thanks to Bart, my way seems to work right now (more or less), but
maybe there is a way to do it more sophisticated
>How should we know? You should supply us with at least three critical
>pieces of information:
> - What did you do?
sub rekurdir {
my $start=$_[0];
opendir(DIR,$start);
while ($direntry=readdir(DIR)) {
next if $direntry eq ".";
next if $direntry eq "..";
#hier testen, ob Datei ein Verz ist
$neustart=$start."/".$direntry;
if (-d $neustart) {
print "subdirectory $direntry\n";
rekurdir($neustart);
}
print "$direntry \n";
}
> - What did you expect it to do?
I expect to give the sub a startpoint, do a recursive walk over all
subdirectories and print all the filenames (for now this will be
sufficient)
> - What did it do?
right now it seems to work, but you wrote:
>?? I would like to check every file in the direcory, and if any file is a
>?? directory itself, I start the check function with the new path.
>No you don't - you will never finish.
so maybe there is a smarter way to do this.
>
>Phases of the moon?
full
>High tide?
No water here
>Sun flares?
no
>
>
>
>
>Abigail
Patrick
------------------------------
Date: Mon, 18 Jan 1999 07:43:01 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: determine, if file is directory
Message-Id: <MPG.110cf65a6b0d6cba989998@nntp.hpl.hp.com>
In article <369dcb0a.316799@129.217.240.1>, pat@uni.de says...
...
> sub rekurdir {
> my $start=$_[0];
> opendir(DIR,$start);
> while ($direntry=readdir(DIR)) {
>
> next if $direntry eq ".";
> next if $direntry eq "..";
>
> #hier testen, ob Datei ein Verz ist
> $neustart=$start."/".$direntry;
>
> if (-d $neustart) {
> print "subdirectory $direntry\n";
> rekurdir($neustart);
>
> }
> print "$direntry \n";
> }
That cannot possibly work. When you recurse, you reuse the global handle
DIR on a new subdirectory, then when you pop back you try to continue
reading the original directory.
You must either use a local new handle for each recursion, or (better,
because otherwise you might run into a file-system limit on too many
handles open simultaneously), read each directory completely into a local
array and then loop and recurse on the members of the array that are
subdirectories.
PS: You might want to indent your code more uniformly to make the
structure easier to see.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 13 Jan 1999 13:40:15 -0000
From: "Simmo" <simsi_NO_SPAM@hotmail.com>
Subject: Re: Email notification
Message-Id: <yMGo2.7$yP3.165@news.enterprise.net>
The LWP::simple perl module contains some useful routines for getting
revision/header info etc which should be suited to this task i'd a thought.
Stephan Slagter <sslagter@eega.nl> wrote in message
369C63EA.1B56C495@eega.nl...
>Hello,
>
>I'm looking for a way to send visitors a email notifications when a html
>page is changed on our server.
------------------------------
Date: Mon, 18 Jan 1999 10:31:22 GMT
From: bryf128@my-dejanews.com
Subject: Re: GD.pm NOT WORKING!
Message-Id: <77v2hr$bgp$1@nnrp1.dejanews.com>
In article <3699377B.F5AE6F69@silvervalley.k12.ca.us>,
Chris Hobbs <chobbs@silvervalley.k12.ca.us> wrote:
...snip...
> C:\Perl\bin>perl ppm.pl
> PPM interactive shell (0.9.4) - type 'help' for available commands.
> PPM> search GD
> Packages available from http://www.ActiveState.com/packages:
> GD
> PPM> install GD
> Install package 'GD?' (y/N): y
> Installing C:\Perl\site\lib\auto\GD\GD.bs
> Installing C:\Perl\site\lib\auto\GD\GD.dll
> Installing C:\Perl\site\lib\auto\GD\GD.exp
> Installing C:\Perl\site\lib\auto\GD\GD.lib
> Installing C:\Perl\site\lib\auto\libgd\extralibs.ld
> Installing C:\Perl\html\lib\GD.html
> Installing C:\Perl\htmlhelp\pkg-GD.chm
> Installing C:\Perl\htmlhelp\pkg-GD.hhc
> Installing C:\Perl\site\lib\auto\GD\autosplit.ix
> Installing C:\Perl\site\lib\GD.pm
> Installing C:\Perl\site\lib\qd.pl
> Writing C:\Perl\site\lib/auto/GD/.packlist
> PPM>
...snip...
Greetings all. I too can't seem to get it to install either. I tried the
above code. When it reached the Packages available from..... line
it didn't produce any packages. I even tried just "search" which is
supposed to produce a list of all packages.
Any ideas?
Thanks,
Brian
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 13:49:15 +0100
From: Harald Giese <giese@dkrz.de>
Subject: Re: glob error
Message-Id: <36A32DCB.A8C2CA10@dkrz.de>
Etienne Pollard wrote:
> ...
> However, running it on Win32 Perl 5.004 doesn't give me an error, but it
> also doesn't give me any output either.
>
> The Win32 code is:
>
> #!c:/perl/bin/perl.exe
>
> @another = <c:\perl\*.*>;
> foreach (@another) {
> print "file $_\n";
> }
> ...
Etienne,
On Win32 platforms you must use "\\" instead of "\":
==> ... <c:\\perl\\*.*>
Regards,
Harald
--
Harald Giese
Email: giese@dkrz.de
Phone: +49 (0)40 4123 5796; Fax: +49 (0)40 5605724
Institut fuer Meereskunde der Universitaet Hamburg
(Institute of Oceanography of the University of Hamburg)
Troplowitzstrasse 7, D-22529 Hamburg
------------------------------
Date: Mon, 18 Jan 1999 13:21:39 +0100
From: Thorbjoern Ravn Andersen <ravn@dit.ou.dk>
Subject: Re: HELP: Writing Date/Time to Log
Message-Id: <36A32753.10B31D53@dit.ou.dk>
Stephen Bucholtz wrote:
>
> I tried $TimeStamp = printf(........
> it gives me 99.
Try with sprintf instead.
--
Thorbjxrn Ravn Andersen "...plus...Tubular Bells!"
http://www.mip.ou.dk/~ravn (+PGP)
------------------------------
Date: Mon, 18 Jan 1999 07:31:05 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to DEBUG perl inside other program
Message-Id: <p2dv77.ci6.ln@magna.metronet.com>
root (root@tbsky.unicap.com.tw) wrote:
> From: root@tbsky.unicap.com.tw (root)
Please tell me that you don't do routine things, such as reading
news, from a privileged account...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 13:09:05 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: How to get IP address of a local machine under NT
Message-Id: <36a33235.511375088@thunder>
On Fri, 15 Jan 1999 16:03:19 +0300, Igor Proskuriakov
<IProskuriakov@mfkren.com> enlightened us thusly:
>Hi, there!
>Could you please tell me how I can get an IP address of a local computer
>running Windows NT, assuming that it has only one network card.
Either grub around in the registry or look at the results of
'ipconfig'.
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Wed, 13 Jan 1999 13:14:56 -0000
From: "Simmo" <simsi_NO_SPAM@hotmail.com>
Subject: Re: how to return HTML to a specific frame
Message-Id: <xMGo2.4$yP3.165@news.enterprise.net>
yeah, strictly html but just add a target param to the <FORM> call
<FORM method="POST" action="xxx.pl" target="main">
Ian
David Campitelli <campitelli@digitalblueworld.com> wrote in message
77ec48$st8$1@fir.prod.itd.earthlink.net...
>I am trying to write a script that will update one frame after a form
>submission has been made in a separate frame.
>
>How do I get the script to return the html in the frame that I want.
>
>Dave
>
>campitelli@digitalblueworld.com
>
------------------------------
Date: Mon, 18 Jan 1999 14:23:06 +0100
From: "Joe" <Joe@rhein.to>
Subject: I forgot
Message-Id: <77vcv5$4p0$1@usenet46.supernews.com>
Hi... I remember doing this once but I forgot how to get the values out of
this baby (it is a variable that got printed and this was the result):
IO::Socket::INET=GLOB(0x8131790)
Can anyone give me a trail to follow... thanks
------------------------------
Date: Mon, 18 Jan 1999 07:47:13 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: kwlii: Formatting numbers in Perl ?
Message-Id: <11ev77.ci6.ln@magna.metronet.com>
kwlii@my-dejanews.com wrote:
: In article <ebohlmanF5LGCu.InC@netcom.com>,
: Eric Bohlman <ebohlman@netcom.com> wrote:
: > kwlii <kwlii@bigfoot.com> wrote:
: > : In COBOL you can create an edit mask for formatting numbers
: > : ie: 28888.00 = $28,888.00 with a PIC $zz,zzz.99
: >
: > : How do you format a number to include the , and the $.
: >
: > Check out Number::Format, available at your nearest CPAN site.
: >
: >
: I can find no Number::Format on the CPAN sites.
http://www.perl.com/CPAN/modules/by-module/Number
: The Perl books state
: that you can't get floating currency symbols or brackets around negative
: numbers or anything interesting.
What Perl books say that?
print "\$$price\n"; # with currency symbol
$price = "[$price]" if $price < 0;
: Does anyone have a subroutine that will
: format numbers like money, or put ','s in the large numbers?
Perl FAQ, part 5:
"How can I output my numbers with commas added?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 08:12:24 -0800
From: Pero Maric <peromaric@yahoo.com>
Subject: local copy of specified url
Message-Id: <36A35D68.1B0EB5CD@yahoo.com>
I am looking for a function that takes an html copy of a specified URL
and
saves it to a local file.
I know this function exists, but I have forgotten the name.
Many thanks in advance.
------------------------------
Date: Mon, 18 Jan 1999 13:34:06 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: local copy of specified url
Message-Id: <ebohlmanF5rCCv.AJF@netcom.com>
Pero Maric <peromaric@yahoo.com> wrote:
: I am looking for a function that takes an html copy of a specified URL
: and
: saves it to a local file.
: I know this function exists, but I have forgotten the name.
It's the getstore() function in LWP::Simple.
------------------------------
Date: Wed, 13 Jan 1999 13:29:38 -0000
From: "Simmo" <simsi_NO_SPAM@hotmail.com>
Subject: Re: logging hits remotely
Message-Id: <xMGo2.6$yP3.165@news.enterprise.net>
Why not create a frameset index page that calls an html page or script from
another server with a pixel width of 1 so it appears invisible? Check out
http://www.mortgagesforbusiness.co.uk for an example i put together a while
back...do a view source on the index page. Not 100% reliable but close :)
Ian Sims
Michael R. Harper <michael@processing.net> wrote in message
369C8C56.A6AC05DC@processing.net...
>Perl/Web Experts,
>
>I have a basic web account that allows no CGI access (just a
>form-to-email and a simple counter). Is there a way to run the cgi from
another
>server and log hits on the basic site?
>
------------------------------
Date: Wed, 13 Jan 1999 13:20:07 -0000
From: "Simmo" <simsi_NO_SPAM@hotmail.com>
Subject: Re: Making perl do tasks at specific times..
Message-Id: <xMGo2.5$yP3.165@news.enterprise.net>
There is a rough way round this if you have a domain that gets more than a
few hits although its not ideal:
write a small script that calculates if the current time matches a time-span
in which you want to run the job. If so, it will call your task script and
write the date to a file so next time, it can check the file to see if its
been run on this date and not repeat. Then use SSI on you website index page
to run the time-checking script every time someone goes into your website -
i know it's overkill and not 100% reliable (the site may not get any
visitors) but without admin privs, what choice do you have and it does work
if you dont mind specifying a time-frame (say, after 8pm etc)?
Hope it helps
Ian
FirstAGYG <firstagyg@aol.com> wrote in message
19990112005133.07277.00011762@ng113.aol.com...
>Hello, im fairly new to the group and Perl itself. I have 2 perl books, and
i
>cant seem to find any info on how to schedual perl to do things at specific
>times, without any intervention from me or a user. Does anyone know of the
>tecnique? Thanks a bunch.
>
>John
------------------------------
Date: Mon, 18 Jan 1999 14:17:27 -0800
From: "Paul Davies" <cobalt@dircon.co.uk>
Subject: Memory management using reference
Message-Id: <36a34361.0@newsread3.dircon.co.uk>
If I have the following:
$refOne = func1();
$refTwo = func2();
func3($refOne,$refTwo);
where func1 and func2 return reference to hashes, I find that refOne points
to the same location as refTwo, i.e. the hash created by func2 is put in the
same memory as the hash created by func1.
If there I can override this behaviour so that %$refOne is not overwritten
by %$refTwo ?
Thanks
Paul
------------------------------
Date: Mon, 18 Jan 1999 15:31:16 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Memory management using reference
Message-Id: <8tIo2.2701$Ge3.12259665@news.itd.umich.edu>
In article <36a34361.0@newsread3.dircon.co.uk>,
Paul Davies <cobalt@dircon.co.uk> wrote:
>If I have the following:
>$refOne = func1();
>$refTwo = func2();
>func3($refOne,$refTwo);
>where func1 and func2 return reference to hashes, I find that refOne points
>to the same location as refTwo, i.e. the hash created by func2 is put in the
>same memory as the hash created by func1.
>If there I can override this behaviour so that %$refOne is not overwritten
>by %$refTwo ?
Make copies of the hashes returned by func1 and func2:
$refOne = { %{ func1() } };
$refTwo = { %{ func2() } };
If that's not clear, here's the same logic in more steps:
{
my $originalRefOne = func1();
my %hashOne = %$originalRefOne;
$refOne = \%hashOne;
}
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: Mon, 18 Jan 1999 15:50:20 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Need help deciphering code
Message-Id: <36A34A2C.8C09087B@ngb.se>
There was a long thread about this kind of thing a while ago, called
"Verify an email address", because this is what I guess you're trying to
do. The outcome of the discussion, I think, was to use Email::Valid to
check the address. Check the thread for yourself, though.
Staffan
------------------------------
Date: Mon, 18 Jan 1999 14:34:11 +0000
From: Richard Carter <rcarter@binaryvision.com>
Subject: perl script to log no of visitors to website
Message-Id: <36A34663.78694F39@binaryvision.com>
hello
Could anyone help me with some perl code (suggest where I could get a
suitable utility) or suggest the code required. What I need to do is to
log the number of visitors to a specific url, not hits. And will refresh
the list every hour
any help
rcarter@binaryvision.com
------------------------------
Date: Mon, 18 Jan 1999 16:11:06 +0100
From: "Ronald Martens" <rmartens@nmsmedia.nl>
Subject: Perl Web browser problem
Message-Id: <77viu2$885$1@heracles.fw.cuci.nl>
Does anyone has a clue?
I can run my perl script in telnet mode.
However when I want to run it in a browser I get a misconfiguration error. I
set the MOD 777 for testing,
use standard $|=1; used STDOUT and...
Does anyone has a simple working perl script e.g. Hello world" that MUST
work, for me to test with.
Ronald.
------------------------------
Date: Mon, 18 Jan 1999 08:51:44 -0500
From: "Murtuza Chhil" <nrd1mmc@nrd.ups.com>
Subject: Problem : Start stop NT service
Message-Id: <77ve9i$iel2@biko.telecom.ups.com>
Hi,
I have Perl 509 and have the win32 service package installed . I tried the
following code and it never stops the service and never assigna a value to
the $i.
What am I doing wrong.
use Win32::Service;
sub Main;
Main;
sub Main {
$i = Win32::Service::StopService('','XLNT Net Service');
print '$i';
}
Thanx Murtuza
------------------------------
Date: Mon, 18 Jan 1999 11:17:50 GMT
From: Eadmund@writeme.com
Subject: problem displaying images via perl cgi script- Pls Help!
Message-Id: <77v58o$do7$1@nnrp1.dejanews.com>
Hi all,
I'm a little bit new to all this and I appolgise if this question is old hat.
I am using the following code to display a gif image, but when I run it, the
image displayed is very small and diaplayed as just a block of colored pixels.
print "Content-type: image/gif\n\n";
open(GIFFILE, "<$protect_gif_dir/$filename") ||
&CgiDie("Could not open $protect_gif_dir/$filename");
while (<GIFFILE>) {
print $_;
}
close (GIFFILE);
This Is generating an output, but not something that ie4.01 seams to
recognise!
Any Ideas????
Eadmund@writeme.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 07:28:10 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: protecting scripts
Message-Id: <atcv77.ci6.ln@magna.metronet.com>
Eric Smith (eric@fruitcom.com) wrote:
: I would like to distribute some simple scripts but do not want
: to give access to the code
: Would appreciate your suggestions.
I would suggest checking the FAQ before posting.
Perl FAQ, part 3:
"How can I hide the source for my Perl program?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 14:36:32 +0100
From: Andrea Spinelli <aspinelli@ismes.it>
Subject: Re: Running a PERL program on NT
Message-Id: <36A338E0.F1F12077@ismes.it>
felicity wrote:
>
> I am having difficulty gettring any Perl Programs to run on my NT box.
Go to http://www.activestate.com/ and install the latest
release of ActivePerl.
Then you will have several indications to help you. Please read
the included HTML documentation.
Hi,
Andrea
------------------------------
Date: Mon, 18 Jan 1999 11:52:35 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Message-Id: <36A32083.EB16E428@eml.ericsson.se>
Ilya Zakharevich wrote:
>
> Did I understand it correct: you chown/set-suid script.pl while it is
> in your laptop, insert it in a server floppy, and run user-level perl
> on it and it bombs? How so?
Basically you have an ext2fs formatted floppy that can hold permission
information. Copy an suid perl script to the floppy, insert it into the
server, run "suidperl /mnt/floppy/scriptname" and BAM! - root access to
the server.
I think that's it anyway - I've not tested this yet.
--
<Matt email="matt@teamamiga.org" />
| Fastnet Software Ltd | Perl in Active Server Pages |
| Perl Consultancy, Web Development | Database Design | XML |
| http://come.to/fastnet | Information Consolidation |
------------------------------
Date: Mon, 18 Jan 1999 14:03:56 +0100
From: Oleg Mercader <o.mercader@cesca.es>
Subject: Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Message-Id: <36A3313B.E379F39@cesca.es>
Matt Sergeant wrote:
> Ilya Zakharevich wrote:
> >
> > Did I understand it correct: you chown/set-suid script.pl while it is
> > in your laptop, insert it in a server floppy, and run user-level perl
> > on it and it bombs? How so?
>
> Basically you have an ext2fs formatted floppy that can hold permission
> information. Copy an suid perl script to the floppy, insert it into the
> server, run "suidperl /mnt/floppy/scriptname" and BAM! - root access to
> the server.
>
> I think that's it anyway - I've not tested this yet.
If you haven't an exec permition in your /etc/fstab for a floppy mounting
point you
can't execute any from a floppy and if you copy a file to a harddisk you
lost your suid.
--
Oleg Mercader
------------------------------
Date: Mon, 18 Jan 1999 15:56:12 GMT
From: Hampton Keathley <hamptonk@bible.org>
Subject: splitting file using eof question
Message-Id: <36A3598E.87633DA1@bible.org>
Greetings,
I need to split an html file into two arrays. One with the body and one
with the notes.
The footnotes always begin with /<P><A NAME\=\"P/ followed by one or
more lines of text, tables, etc.
I can't just match the <P><A NAME\=\"P and grab next line because there
are often multiple lines between the <P><A NAME\=\"P lines.
I figured out how to take everything from the first <P><A NAME\=\"P to
the end of file with this:
$line = <INFILE>;
while (<>){
print NOTEFILE if /<P><A NAME\=\"P/ .. eof;
}
BUT, I really want to take all the notes and send them to @NOTES and the
rest of the file before my match and send them to @BODY.
Anyone know how to do that?
Thanks,
Hampton
------------------------------
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 4678
**************************************