[21773] in Perl-Users-Digest
Perl-Users Digest, Issue: 3977 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 16 00:05:40 2002
Date: Tue, 15 Oct 2002 21:05:09 -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 Tue, 15 Oct 2002 Volume: 10 Number: 3977
Today's topics:
Re: !\n problem (zawy)
Re: array of array? <chjb,45@mail.com>
Re: array of array? <jackkon@ms29.url.com.tw>
Re: array of array? <jackkon@ms29.url.com.tw>
Re: attr proposition: function call performed at compil (Jay Tilton)
Re: Can anyone tell me how to get GD (& GD::Graph) work <bwalton@rochester.rr.com>
Re: Can I have variables inside my pod? (Was: How can I <REMOVEsdnCAPS@comcast.net>
Re: Converting undefined strings to null strings (Tim Behrendsen)
dump not dumping Was: Re: Perl Memory Management <pkent77tea@yahoo.com.tea>
Re: dump not dumping Was: Re: Perl Memory Management <ddunham@redwood.taos.com>
Re: dump not dumping Was: Re: Perl Memory Management <garry@ifr.zvolve.net>
How can you invoke the SSIs in a .shtml.. <muchari@cisco.com>
Re: How can you invoke the SSIs in a .shtml.. <flavell@mail.cern.ch>
Re: http://lists.perl.org (slightly OT) <mgjv@tradingpost.com.au>
need help with extraction <sendsunilmail@yahoo.com>
Re: Novice seeks help <bpfsa@yahoo.com>
Opinion on using Perl or JavaScript for Web development (Brian)
Re: Opinion on using Perl or JavaScript for Web develop (Jay Tilton)
Re: OS interface <mgjv@tradingpost.com.au>
Problems after update 5.0 -> 5.8 <100.17706@germanynet.de>
Re: Q: does there exist an HTTP redirect script ? (Charles DeRykus)
Re: Random Character Picker <dhull01@comcast.net>
Re: Random Character Picker <pkent77tea@yahoo.com.tea>
Re: Run perl script on web server from command line <bwalton@rochester.rr.com>
silent detection of cgi completion problem (Steve)
Re: silent detection of cgi completion problem <jeff@vpservices.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 16 Oct 2002 00:29:06 GMT
From: zawy@yahoo.com (zawy)
Subject: Re: !\n problem
Message-Id: <3daca9f2.26584996@news.knology.net>
I'll cast a 3rd vote against mail as being the cause of the !\n
In the businessweek article i mentioned, i counted 988 to 991 characters in
the unbroken line of text before the !\n depending on how their html was
indented, and in a post made to thevoices.net which uses mailman (which
uses mail?), I counted 989, so the 989 mentioned earlier seems to be it.
------------------------------
Date: Tue, 15 Oct 2002 15:55:14 -0700
From: "Chris. Jacobs" <chjb,45@mail.com>
Subject: Re: array of array?
Message-Id: <aoi6dh$3i$1@news.astound.net>
"jackkon" <jackkon@ms29.url.com.tw> wrote in message
news:aogejf$4p5@netnews.hinet.net...
> hi, all
> How to the convert a text file below to the array of array?
> Thanks a lot.
>
> ========text file
[Snip Cobol-looking code]
wow, is that Cobol? Its been a while sicne I used that lol.
------------------------------
Date: Wed, 16 Oct 2002 10:21:13 +0800
From: "jackkon" <jackkon@ms29.url.com.tw>
Subject: Re: array of array?
Message-Id: <aoii2p$j@netnews.hinet.net>
"David K. Wall" <usenet@dwall.fastmail.fm> ¼¶¼g©ó¶l¥ó
news:Xns92A86D55A94DAdkwwashere@216.168.3.30...
> jackkon <jackkon@ms29.url.com.tw> wrote on 15 Oct 2002:
> > 01 AAAA-F.
> > 03 AA-ERR PIC S9(05).
> > 03 AA-FNAME PIC X(10).
> > 03 AA-COUNT-K PIC 9(10).
> > 01 AAAA-R.
> > 03 AA-REC-KEY.
> > 05 AA-DEPT-NO PIC X(02).
> > 05 AA-DEPT-MAX PIC X(02).
> > 03 AA-DEPT-NAME PIC X(12).
> > 03 AA-BED-NO PIC 9(05).
> > 03 AA-TOT-BED-NO PIC 9(05).
> >
> Here's a way that looks at the indentation of the data and creates array
> entries based on that. It assumes that indents are exactly 8 spaces, and
> "first-level" entries (lines starting with '01' in your sample data) are
> indented 8 spaces. Your data looks as if it were generated by a program,
> so maybe these assumptions aren't unreasonable.
>
Thanks David.
Your code works well.
I extract the source code from a COBOL code.
So the indents are not always exactly 8 spaces.
But the first-level is always 01.
I must decide the level according to the frist two digital numer in a line.
for example,
01-----> level 1
03-----> level 2
05-----> level 3
So, I must record the "digitail number--level" realtion.
the line beginnig with 01 digital number line is always in level 1,
But thel ine beginning with 03 digital number line is not always in level 2.
may be the line beginning with 02 digital number line is level 2.
Every line begining with 01 affect the level line begining with digital
number less then 01.
Sorry, my English is poor. I can't explain the rule clearly -.-"
> Of course I had Tassilo's solution to work from, so I just altered it a
> little. :-)
What's Tassilo's solution?
------------------------------
Date: Wed, 16 Oct 2002 10:25:28 +0800
From: "jackkon" <jackkon@ms29.url.com.tw>
Subject: Re: array of array?
Message-Id: <aoiia0$119@netnews.hinet.net>
"Chris. Jacobs" <chjb,45@mail.com> ¼¶¼g©ó¶l¥ó
news:aoi6dh$3i$1@news.astound.net...
> "jackkon" <jackkon@ms29.url.com.tw> wrote in message
> news:aogejf$4p5@netnews.hinet.net...
> > hi, all
> > How to the convert a text file below to the array of array?
> > Thanks a lot.
> >
> > ========text file
>
> [Snip Cobol-looking code]
> wow, is that Cobol? Its been a while sicne I used that lol.
Yes, It's Cobol.
It's not easy to parse the Cobol declaration part to perl 's array of array.
Beside the question I mention here, I think I also have the 'OCCURS',
'REDEFINES' questions.
Do you have the same experience with the convert job?
Welcome your suggestion ^^
------------------------------
Date: Wed, 16 Oct 2002 03:36:55 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: attr proposition: function call performed at compile time
Message-Id: <3dacdd0c.109492836@news.erols.com>
Daniel Pfeiffer <occitan@esperanto.org> wrote:
| sub mysub : begin { ... }
[snip]
| But he can't use
| it normally, unless calling my function within a BEGIN { ... }.
If the purpose is to make the sub inaccessible after compile-time,
what would the new attribute buy that couldn't be accomplished with
CHECK{ undef &mysub }
------------------------------
Date: Wed, 16 Oct 2002 01:54:49 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Can anyone tell me how to get GD (& GD::Graph) working on Win32!!
Message-Id: <3DACC6D9.1060607@rochester.rr.com>
Rubber Duck wrote:
...
> As subject. I've searched google till i'm blue in the face Played about
> with GD.dll and GD.pll. I'm trying to use GD::Graph but of course this
> needs GD which on linux has C dependencies.
...
> PT
At a command prompt:
ppm install GD
followed by:
ppm install GDGraph
should do the trick. Works for me, anyway (AS build 633, Windoze 98SE).
--
Bob Walton
------------------------------
Date: Tue, 15 Oct 2002 17:47:01 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Can I have variables inside my pod? (Was: How can I tell what version a module is?)
Message-Id: <Xns92A8BF1EBFB2Csdn.comcast@216.166.71.239>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Mac <REMOVEstray_searcher@hotmail.com> wrote in news:818z101ap0.fsf_-
_@kwikemart.springfield.se:
> I usally strip my modules version from cvs with something like this:
>
> # get version from CVS
> $VERSION = sprintf "%d.%02d", '$Revision: 1.13 $' =~ /(\d+)\.(\d+)/;
Putting a $ just before the closing quote screws up some syntax
highlighters, most importantly, the one I use. :-)
Suggest you either put a space between teh dollar and the quote, or you use
Perl's q operator to make the $ the quote:
...%02d", q$Revision: 1.13 $ =~ /...
Iain Chambers already showed you how to get that directly into the pod. I
have done this, but I find it unsatisfactory -- sometimes I will have
several cvs revisions leading up to one version change of a module. I
don't have a good solution; I manually keep the $VERSION and the pod in
sync. :-/
- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPaya8mPeouIeTNHoEQKdrgCgp0tOMKuZd0zjad7ECLWfUkehGfUAoMNj
xibDs5Jk6+gxbdA9tywYnYba
=WRpv
-----END PGP SIGNATURE-----
------------------------------
Date: 15 Oct 2002 16:33:13 -0700
From: nospam@behrendsen.com (Tim Behrendsen)
Subject: Re: Converting undefined strings to null strings
Message-Id: <6d726a77.0210151533.639b8b95@posting.google.com>
Benjamin Goldberg <goldbb2@earthlink.net> wrote in message news:<3DAC5563.43D5E213@earthlink.net>...
>
> Then you should use the lexical pragma, "no warnings qw(undefined);" in
> the scope of the place where you're doing that comparison.
That's certainly one way to do it, but something with a little finer
granularity would be nice. I like having the warnings for normal
cases, but sometimes you just want to compare a database column to ''
without having to jump through hoops.
------------------------------
Date: Tue, 15 Oct 2002 22:25:11 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: dump not dumping Was: Re: Perl Memory Management
Message-Id: <pkent77tea-46B302.23251115102002@news-text.blueyonder.co.uk>
In article <87d6qbpqsj.fsf@my.vilmos.lan>,
Vilmos Soti <vilmos@vilmos.org> wrote:
> I have a related question. Suppose I have the following code:
>
> $password = <>;
> &authenticate ($password);
> $password = "";
>
> At this point, what happens to $password? Is the value still in
> memory just is inaccessible? (so it would show up in a coredump?)
I tried this, using the dump() function in perl 5.00503, 5.6.1 and 5.8.0
and none of them created a core dump. None of them. I even tried sending
SIGSEGV to the perl process and nothing happened. I even tried the old
favourite[1] of appending 'undef tcp;' which did cause a segmentation
violation but no core file.
So I have a related question: what happened to dump() on my system
(details of my main perl at end)
P
[1] On this group at least
This is perl, v5.6.1 built for ppc-linux-multi
Copyright 1987-2001, Larry Wall
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.2.14, archname=ppc-linux-multi
uname='linux dev 2.2.14 #1 sun sep 23 01:51:48 gmt 2001 ppc unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='/usr/bin/gcc', ccflags ='-DDEBUGGING -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBUGGING'
ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='/usr/bin/gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
-lutil
perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Dec 14 2001 23:42:28
@INC:
/usr/local/perl5.6/lib/5.6.1/ppc-linux-multi
etc
--
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply
------------------------------
Date: Tue, 15 Oct 2002 22:35:14 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: dump not dumping Was: Re: Perl Memory Management
Message-Id: <CK0r9.1330$rU3.71764026@newssvr13.news.prodigy.com>
pkent <pkent77tea@yahoo.com.tea> wrote:
>> At this point, what happens to $password? Is the value still in
>> memory just is inaccessible? (so it would show up in a coredump?)
> I tried this, using the dump() function in perl 5.00503, 5.6.1 and 5.8.0
> and none of them created a core dump. None of them. I even tried sending
> SIGSEGV to the perl process and nothing happened. I even tried the old
> favourite[1] of appending 'undef tcp;' which did cause a segmentation
> violation but no core file.
Do other processes create dumps? If you have coredumpsize limited to 0,
I imagine you will not get one.
Have you tried gcore?
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
------------------------------
Date: Wed, 16 Oct 2002 03:29:45 GMT
From: Garry Williams <garry@ifr.zvolve.net>
Subject: Re: dump not dumping Was: Re: Perl Memory Management
Message-Id: <slrnaqpn29.bav.garry@zfw.zvolve.net>
On Tue, 15 Oct 2002 22:25:11 GMT, pkent <pkent77tea@yahoo.com.tea> wrote:
> In article <87d6qbpqsj.fsf@my.vilmos.lan>,
> Vilmos Soti <vilmos@vilmos.org> wrote:
>
>> I have a related question. Suppose I have the following code:
>>
>> $password = <>;
>> &authenticate ($password);
>> $password = "";
>>
>> At this point, what happens to $password? Is the value still in
>> memory just is inaccessible? (so it would show up in a coredump?)
>
> I tried this, using the dump() function in perl 5.00503, 5.6.1 and 5.8.0
> and none of them created a core dump. None of them. I even tried sending
> SIGSEGV to the perl process and nothing happened. I even tried the old
> favourite[1] of appending 'undef tcp;' which did cause a segmentation
> violation but no core file.
You meant to send SIGABRT.
--
Garry Williams
------------------------------
Date: Tue, 15 Oct 2002 16:29:10 -0700
From: Murali Chari <muchari@cisco.com>
Subject: How can you invoke the SSIs in a .shtml..
Message-Id: <3DACA4C6.B9FA6A14@cisco.com>
.. when you print it to the browser thorugh a CGI perl script.
Example: /cgi-bin/x.cgi prints /app1/y.shtml with the
Content-type:text/html header.
y.shtml has a few exec statements calling some Server Side Includes.
I am able to print out the HTML but the SSIs are not being invoked.
What can I do to correct this?
-Murali
------------------------------
Date: Wed, 16 Oct 2002 01:43:44 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How can you invoke the SSIs in a .shtml..
Message-Id: <Pine.LNX.4.40.0210160139280.4315-100000@lxplus075.cern.ch>
On Oct 15, Murali Chari inscribed on the eternal scroll:
> .. when you print it to the browser thorugh a CGI perl script.
Well certainly not by concentrating on a study of the Perl programming
language.
> I am able to print out the HTML but the SSIs are not being invoked.
That's normal.
> What can I do to correct this?
Investigate the documentation for the server that you use. The SSI is
a concept, more than a formal specification (unlike the CGI, which is
a defined interworking spec). So there are significant differences in
the support for SSI offered by different servers, which you aren't too
likely to get reliable answers about on a Perl programming group.
(hint: comp.infosystems.www.servers.* after checking that
documentation.)
The other approach is to have the CGI script insert whatever it was
that you were hoping the SSI would insert.
------------------------------
Date: Wed, 16 Oct 2002 03:01:28 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: http://lists.perl.org (slightly OT)
Message-Id: <slrnaqplmv.1qr.mgjv@verbruggen.comdyn.com.au>
On 15 Oct 2002 18:10:17 GMT,
Tassilo v. Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote:
> Also sprach Rocco Caputo:
>
>> Also check if your newsfeed has a perl.xs newsgroup.
>
> Also negative. But there is nntp.perl.org, as I just discovered. A
> newsserver dedicated to Perl...I finally found heaven. ;-)
>
> Thanks for pointing me to the news-approach. Much better than a mails!
Last time I tried, it was still a read-only news service (except that
it isn't configured to be one, so my client didn't know about it).
What I mean is that reading the mailing lists works well through it (I
do it all the time), but posting to them doesn't mean your post ends
up on the mailing list or even on the server. It seems to just
accept the post, which then ends up in /dev/null. Since I use
leafnode, it might be an artefact of the way that works.
Martien
--
|
Martien Verbruggen |
Trading Post Australia | values of Beta will give rise to dom!
|
------------------------------
Date: Tue, 15 Oct 2002 22:55:53 -0400
From: "Sunil Abraham" <sendsunilmail@yahoo.com>
Subject: need help with extraction
Message-Id: <pP-cnZH3D5wGTzGgXTWc3Q@News.GigaNews.Com>
1. C:\ABC\xyz\trw\rti.doc
2. x:\trw\yuw\yuts\yurx@yur_utx\lastinfo
In 1., I want to be able to extract everything after C:\ABC\ ie.
xyz\trw\rti.doc
In 2. everything starting with the last "\" ie. \lastinfo
Any help appreciated.
Sunil
------------------------------
Date: Wed, 16 Oct 2002 10:02:43 +1000
From: "Trevor Johnson" <bpfsa@yahoo.com>
Subject: Re: Novice seeks help
Message-Id: <aoiab5$456$1@lust.ihug.co.nz>
Thank you, everyone. With your advices, the problem is now solved and it is
working fine. My blood pressure has probably already dropped 20 points,
thanks to your generous help. My most sincere thanks to all who contributed
suggestions, solved my problem, and helped to educate me a little more.
------------------------------
Date: 15 Oct 2002 16:51:03 -0700
From: BChirhart@fnni.com (Brian)
Subject: Opinion on using Perl or JavaScript for Web development
Message-Id: <9d13498b.0210151551.7dc7f22f@posting.google.com>
This is more of an opinion question than anything. Hopefully I will
go down the right track after your responses...
I need to develop a web page. It will need to have radio buttons,
drop downs, and list boxes. The drop down menus need to be cascading
(i.e. change an option in the first menu and the values listed in the
second menu change). Also, the second menu has to be populated by
reading the directory structure of a server. The list box is
populated from the list of files that are in the directory of the
second drop down. Because of that, I can not get CGI (or CGI.pm) to
work. Once the values are entered in the radio buttons and the drop
downs, the user will need to click a button (submit or otherwise) and
a perl script will need to run that will create a JPG or PNG file.
Then a new web page will need to open displaying some text and the
file.
My problem is:
If I use all Perl - I can not get a GUI web interface. If this is
wrong and I can do this whole thing in Perl PLEASE TELL ME!!! I
already have most of the code written in Perl and would really hate to
change it.
If I use CGI - I can not get cascading menus to work correctly and can
not access the directories on the server. This is a limitation of CGI
- correct?
If I use Javascript... Well - I don't know much about Javascript and I
thought that was going to be my answer. But then I read a bunch of
posts where people are talking about server side/client side JS and
basically that you should not mix perl and JS.
The last option is PHP - which I know NOTHING about other than how to
spell it.
I am not against learning any of these things, but if you had my
assignment, what route would you take?
TIA for all your input and suggestions.
Brian
------------------------------
Date: Wed, 16 Oct 2002 02:20:34 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Opinion on using Perl or JavaScript for Web development
Message-Id: <3daccc2f.105175012@news.erols.com>
BChirhart@fnni.com (Brian) wrote:
| If I use Javascript... Well - I don't know much about Javascript and I
| thought that was going to be my answer. But then I read a bunch of
| posts where people are talking about server side/client side JS and
| basically that you should not mix perl and JS.
Weird. Did they say why?
Perl does the server-side processing.
Javascript does the client-side processing.
They don't need to have much of anything to do with each other.
------------------------------
Date: Tue, 15 Oct 2002 23:34:35 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: OS interface
Message-Id: <slrnaqp9j2.1qr.mgjv@verbruggen.comdyn.com.au>
On Tue, 15 Oct 2002 22:01:33 GMT,
pkent <pkent77tea@yahoo.com.tea> wrote:
> In article <1034683107.3214@intranet.consol.de>,
> Frank Winkler - Sun Germany - Enterprise Services
> <frank.winkler@sun.com> wrote:
>
>> Does anybody know a module which provides an interface to OS specific
>> information like "ps" or "df"? I want to prevent explicitly opening a
>> command pipe to keep it portable ...
[snip]
> Looking on CPAN the answer, for ps(1), seems to be no. There _are_ OS
> specific modules there (look for 'process' in the module name), but not
> a generic one.
Proc::ProcessTable is pretty generic, for all sorts of Unices [1].
> For df, there are unixish solutions, but nothing generic, looking for
> 'disk'. Could be a gap in the market there :-)
The most likely to work (they come bundled):
Filesys::Df
Filesys::Statvfs
Others:
Filesys::DiskFree
Filesys::DiskSpace
Martien
[1] I'm simply assuming that the OP is only interested in Unices,
since they specifically mentioned the df and ps commands, and they are
posting from a Sun address. If that is not true, then the OP should
probably have mentioned it.
--
|
Martien Verbruggen | Unix is the answer, but only if you phrase
Trading Post Australia | the question very carefully
|
------------------------------
Date: Wed, 16 Oct 2002 00:25:33 +0200
From: Rick Denoire <100.17706@germanynet.de>
Subject: Problems after update 5.0 -> 5.8
Message-Id: <883pqusdgvklfaufvrj52fagr47ecei2ea@4ax.com>
Hello
I got the perl 5.8 binaries for Solaris 7 from sunfreeware and
installed them in a system where perl 5.0 already existed and was
working fine. The installation script created parallel directories for
the version 5.8, and now "perl" is a link to perl5.0 or perl5.8.
Problems:
perldoc doesn't work any more (from the original perl 5.0
installation). Hints?
Modules don't work together with the new version 5.8 (they weren't
reinstalled).
Apart from that, perl 5.8 seems to work fine. Since I don't use perl
myself (I prefer shell scripts), I need some help about how to get
things working *without* jeopardizing the existing perl installation,
that is, I should be able to get perldoc and the modules working when
I invoke perl 5.8 using its actual path:
#/usr/local/bin/perl5.8
Any change I do wouldn't be noticed as long as "perl" is a link to the
old perl5.0 (the whole intranet depends on perl...). If the new
perl5.8 is finally put to work including all its modules, then I would
change the link to point to it - the switch would be immediate and
would not cause any problem.
How do I find out ALL installed perl modules in the system?
Should I install them again? Would the new installation of modules
leave the old modules from version 5.0 untouched or would these be
overwitten? Does the installation of a perl module imply a C
compilation of it?
And: How to I deinstall perl 5.0 afterwards? Just deleting the files?
Thanks a lot for your help!
Rick
------------------------------
Date: Wed, 16 Oct 2002 01:57:28 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Q: does there exist an HTTP redirect script ?
Message-Id: <H41xFs.7J2@news.boeing.com>
In article <MPG.18163d9dce81146398968c@news.free.fr>,
Gros Loup <smillet751@nospammersplz.hotmail.com> wrote:
>Hello,
>
>I need to trace HTTP connections between two given points and an easy
>way to proceed would be insert a PERL script, that would just listen and
>forward datas in telnet format (thus, not necessarily port 80) in both
>directions (and log it).
>
>Do you know of a PERL script that is capable of doing it (I didn't find
>in CPAN) ?
>
httpsniffer [a Perl script] can do this:
http://www.schmerg.com/WrapUp.asp?file=HttpSniffer.html
I seem to recall something similar in the 'Perl Cookbook' [authors
Christiansen,T and Torkington,N] but I'm not positive.
--
Charles DeRykus
------------------------------
Date: Tue, 15 Oct 2002 17:14:32 -0500
From: "h0mebrau" <dhull01@comcast.net>
Subject: Re: Random Character Picker
Message-Id: <nOGdneyGmpYWDzGgXTWcpA@News.GigaNews.Com>
This sounds like someones class homework.........:)
"PinkPuppy" <spam@stinks.com> wrote in message
news:hAYq9.526$XsJ4.14286941@news2.randori.com...
> I'd like to write a script that generated a specified number of random
> characters. I want to be able to specify which characters to choose from.
> Can someone show me some simple sample code that does something like this?
>
>
------------------------------
Date: Tue, 15 Oct 2002 22:31:16 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: Random Character Picker
Message-Id: <pkent77tea-029E5A.23311615102002@news-text.blueyonder.co.uk>
In article <hAYq9.526$XsJ4.14286941@news2.randori.com>,
"PinkPuppy" <spam@stinks.com> wrote:
> I'd like to write a script that generated a specified number of random
> characters. I want to be able to specify which characters to choose from.
> Can someone show me some simple sample code that does something like this?
you probably want to read options from the command line, but this should
work:
#!/usr/local/bin/perl -w
use strict;
my $numChars = 8;
my @charSet = map { chr } 38, 39, 42, 45, 53, 58, 59, 60, 61, 62, 63,
64, 78, 88, 89, 91, 94, 97, 99, 103;
print $charSet[rand(@charSet)] while $numChars--;
print "\n";
__END__
P
--
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply
------------------------------
Date: Wed, 16 Oct 2002 02:01:29 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Run perl script on web server from command line
Message-Id: <3DACC869.8070506@rochester.rr.com>
Me wrote:
> I have a perl script on a web server which can of course be executed from a
> web browser.
>
> i.e. http://www.my.server/scripts/myperl.pl
>
> Is there any way I can execute this script from a Windows 2000 command line
> instead of going through the browser ?
Sure:
perl -MLWP::Simple -e 'get "http://www.my.server/scripts/myperl.pl"'
is one way. Interchange " and ' if on Windoze.
--
Bob Walton
------------------------------
Date: 15 Oct 2002 16:39:43 -0700
From: haysmans@hunterlink.net.au (Steve)
Subject: silent detection of cgi completion problem
Message-Id: <2246e285.0210151539.11e43eae@posting.google.com>
Hi,
I have a perl cgi which is submitted from javascript function using an
image as the return (because I don't want the current webpage
disturbed). The cgi performs some background file manipulations, and I
need the webpage to be able to detect when the cgi has finished. I
thought that I might be able to check the return src value using a
setTimeout to see when it had changed, but although the image itself
changes, the src value does not change (I guess that's obvious to you
professionals out there).
Does anyone have a successful way to detect when the cgi has finished,
without wiping away the original webpage? Perhaps my code below is
close?? Please provide syntax if you have it.
thanks for your help (in advance)
Steve
How I thought this would work:
javascript sets src to a wait gif, then submits the cgi to the same
src.
cgi finishes and returns the original (nowait) gif, and the javascript
settimeout detects the change.
What happens:
javascript sets src to a wait gif, submits the cgi.
cgi finishes and returns an image (although it is distorted - I dont
know why)
but the src value remains unchanged as src =
"cgi-bin/filechg.pl?Param1=1234"
client side code is:
<img src="images\nowait.gif" name="IStatus" width="1" height="1">
<script Language="JavaScript"><!--
var timer = 0;
function Submit(theForm)
{
document.images['IStatus'].src = "images/wait.gif";
timer = 0;
document.images['IStatus'].src = "cgi-bin/filechg.pl?Param1=" +
theForm.fldParam.value;
Submit_Loop();
}
function Submit_Loop()
{
timer = ++timer;
if ((document.images['IStatus'].src == "images/nowait.gif") ||
(timer > 3))
{
cgi_finished_so_Do_something_else( );
}
else {
myTimer = setTimeout("Submit_Loop()", 500);
}
}
perl cgi script return section is:
$image = 'D:\\Inetpub\\wwwroot\\fred\\images\\wait.gif';
print "Content-type: image/gif\n\n";
$| = 1;
open(GRAPHIC, $image);
print <GRAPHIC>;
close(GRAPHIC);
exit();
------------------------------
Date: Tue, 15 Oct 2002 18:24:40 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: silent detection of cgi completion problem
Message-Id: <3DACBFD8.3010107@vpservices.com>
Steve wrote:
>
> I have a perl cgi which is submitted from javascript function using an
> image as the return (because I don't want the current webpage
> disturbed). The cgi performs some background file manipulations, and I
> need the webpage to be able to detect when the cgi has finished.
What's wrong with using the DOM image.onLoad() event handler? (if that
doesn't solve your problem, please ask in a JavaScript newsgroup).
> cgi finishes and returns an image (although it is distorted - I dont
> know why)
That's the only part of your problem that's perl related and the answer
is: because you neglected to binmode the STDOUT before printing.
--
Jeff
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 3977
***************************************