[8884] in Perl-Users-Digest
Perl-Users Digest, Issue: 2501 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 5 10:07:01 1998
Date: Tue, 5 May 98 07:01:04 -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 Tue, 5 May 1998 Volume: 8 Number: 2501
Today's topics:
Re: $$#_ ? (John Porter)
chdir in Win NT <olevine@clalit.co.il>
Re: chdir in Win NT <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Checking for Ping reply??? (Jeffrey R. Drumm)
Re: Computing length of hash (Tom Grydeland)
Re: condition to subroutine (Ilya Zakharevich)
Re: Converting COBOL Comp-3 field <brobbins@tis.com>
Re: directorys and Files? (Tom Grydeland)
Re: Ever Wonder Why Not Everyone Uses Modules? <andy@wonderworks.co.uk>
Re: Ever Wonder Why Not Everyone Uses Modules? (John Porter)
Re: Ever Wonder Why Not Everyone Uses Modules? <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
failing to interpret * on NT command line <tgray@smlny.com>
Re: failing to interpret * on NT command line <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: How do I reuse functions in several programs? <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
how to run Perl script on remote server not having Perl venkat5@hotmail.com
Re: how to run Perl script on remote server not having scott@softbase.com
Re: Padding a string to be a fixed length (Tom Grydeland)
passing .htaccess login info <bwsd@bwsd.com>
Re: passing .htaccess login info <Tony.Curtis+usenet@vcpc.univie.ac.at>
passing a copy of data refered to via a hard ref <gmorgan@photographics.co.uk>
Re: perl and Cisco??? <kevinl@ascend.com>
PERL and OpenNT <krm@rti.org>
Re: perl script to trans smtp mail text to html scott@softbase.com
Re: Perl Win NT scott@softbase.com
PERL-5.00404 and Cygwin NT installation problem <Jakob.Heinemann@esavionics.se>
Re: Perl/Wall lingo question <boys@aspentech.com>
Re: Personal Web Server and Perl (Jim Stalker)
Re: regex newline substitution question <rick.delaney@shaw.wave.ca>
Scheduling a perl script under NT, makes stat() return (Michael Kristensen)
What it perl? <36haus@but.auc.dk>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 05 May 1998 12:34:03 GMT
From: jdporter@min.net (John Porter)
Subject: Re: $$#_ ?
Message-Id: <MPG.fb8d2b34ff74719896a6@news.min.net>
On 5 May 1998 06:42:28 GMT,
in article <6imcck$872$1@nntp1.ba.best.com>,
dfetter@shell4.ba.best.com (David Fetter) wrote:
> Phil R Lawrence <prl2@lehigh.edu> wrote:
> > $_ is a hard reference to an array. How do I determine the subscript of the
> > final element of the array?
>
> > $$#_ doesn't seem to work.
>
> scalar($_)-1 does for me :)
That's odd, it doesn't for me. But scalar(@$_)-1 does.
However, scalar(@a)-1 is not necessarily the same as $#a.
It depends on the value of $[.
John Porter
------------------------------
Date: Tue, 5 May 1998 15:25:19 +0300
From: "Oren Levine" <olevine@clalit.co.il>
Subject: chdir in Win NT
Message-Id: <6in0nu$6mt$1@news.netvision.net.il>
I adapted a search engine script to work with NT.
I have a problem with the following:
sub get_files {
chdir ($basedir);
However, chdir won't work. It's supposed to 'chdir' from "c:inetpub\scripts"
to
"c:\inetpub\wwwroot\somedirectory", but it doesn't
Oren
------------------------------
Date: Tue, 5 May 1998 06:41:18 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: chdir in Win NT
Message-Id: <6in4ts$gii@bgtnsc03.worldnet.att.net>
Oren Levine wrote in message <6in0nu$6mt$1@news.netvision.net.il>...
>I adapted a search engine script to work with NT.
>I have a problem with the following:
>sub get_files {
>
> chdir ($basedir);
>However, chdir won't work. It's supposed to 'chdir' from
"c:inetpub\scripts"
>to
>"c:\inetpub\wwwroot\somedirectory", but it doesn't
>
>Oren
>
>
>
chdir works as long as you do it properly (not that I always do). Perl
supports forward slashes in directory names on NT, so try this:
$basedir = "C:/INETPUB/WWWROOT/SOMEDIRECTORY";
chdir($basedir) or die "Can't chdir to $basedir: $!";
If it doesn't work at least you may get some useful information out of
$!.
HTH
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
------------------------------
Date: Tue, 05 May 1998 12:34:17 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Checking for Ping reply???
Message-Id: <354ef814.433509233@news.mmc.org>
[posted and mailed]
On Tue, 5 May 1998 11:18:56 +1000, "Andrew Specht" <andrew@iaccess.com.au>
wrote:
>Hi,
Howdy.
>I was wondering if there is an option in perl to ping a host and then to
>check for a reply. And if there is a reply, then do something else and so
>on
If you've got a reasonably modern version of Perl, the Net::Ping module
(included in the standard distribution) will do exactly what you want.
$ perldoc Net::Ping
Example:
#!/usr/bin/perl -w
use Net::Ping;
my $timeout = 2; # seconds
my $p = Net::Ping->new('icmp',$timeout);
do_something() unless $p->ping('host'); # 'host' is host name or IP address
>Basically i would like to check every 10 minutes if one of my servers is
>still up.
Hmmm. Lemme guess . . . an NT server? ;-)
>Thanks in advance for any help :)
yaweckum.
>Andrew Specht
>System Administrator
>Internet Access Australia
>andrew@iaccess.com.au
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: 5 May 1998 11:58:26 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Computing length of hash
Message-Id: <slrn6ktvn2.hm7.Tom.Grydeland@mitra.phys.uit.no>
On Tue, 05 May 1998 08:57:59 +0200,
Ian Maloney <ian.maloney@ubs.com> wrote:
> In the Camel book (p.183) the recommended way to get the length of a
> hash is with:
>
> scalar keys %hash;
>
> My guess is that this is quite 'expensive' as it has to first build the
> list of keys, and as I want to do this often (every cycle through the
> program) I have been keeping track of the length with a counter to avoid
> this operation.
>
> My question is: am I correct in thinking that this is an expensive
> operation? and is there an alternative?
No. Contrary to what you think, keys() is capable of knowing that it's
being called in a scalar context, returning only the number of keys.
On the other hand, any other way of accomplishing the same would have to
build a list of keys - which would be expensive.
There's a reason why the recommended solution is, you know.
> Ian Maloney
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 5 May 1998 06:16:18 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: condition to subroutine
Message-Id: <6imari$khk$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Bob Trieger
<sowmaster@juicepigs.com>],
who wrote in article <354E701D.76CD@juicepigs.com>:
> I also learned empty parens aren't needed when ampersand is used.
Whatdoyoumean, "aren't needed"? They provide a different semantic.
Ilya
------------------------------
Date: Mon, 04 May 1998 11:45:38 -0400
From: Bert Robbins <brobbins@tis.com>
To: Bob Tate <btate@primary.net>
Subject: Re: Converting COBOL Comp-3 field
Message-Id: <354DE2A2.368D@tis.com>
Bob Tate wrote:
>
> Actually, In a nutshell, I believe that if I can convert HEX to BCD that
> would give me the desired results. And no, the unpack command does not work
> in the way that you or I feel that it should. using either the "H8" or the
> "h8" seems to unpack the number but with a result that is not what I am
> looking for. Also, COMP-3 in COBOL is very much like BCD or Packed decimal.
COMP-3 is a form of packing 8-bit encoded numbers into fields that are
half
the size of the filed of he unencoded number + 1.
Vaule: 98765
Binary Hex: 01 81 CD
ASCII String: 39 38 37 36 35
EBCIDIC String: F9 F8 F7 F6 F5
Packed (COMP): 98 76 F5
Packed (COMP-3): 98 76 5F
Thanks
Bert Robbins
------------------------------
Date: 5 May 1998 12:24:35 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: directorys and Files?
Message-Id: <slrn6ku181.hm7.Tom.Grydeland@mitra.phys.uit.no>
On Mon, 04 May 1998 22:51:35 -0500,
darkcyde <bazaillion@primary.net> wrote:
> Is there any commands in perl for instance if you gave it a directory it
> could traverse it and obtain all the names and files in the directory?
there's globbing, and there's (open|read|close)dir. Your choice.
> -mike
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Tue, 5 May 1998 13:54:11 +0100
From: Andy Armstrong <andy@wonderworks.co.uk>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <zZ9BCDAzvwT1EwSF@wndrwrks.demon.co.uk>
In article <fl_aggie-0405982151170001@aggie.coaps.fsu.edu>, I R A Aggie
<fl_aggie@thepentagon.com> writes
>In article <6ilddd$344$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
>(Tom Christiansen) wrote:
>
>+ Another problem with that is if it goes on forever, no one will
>+ ever learn how to make wheels.
>
>Ah, so, someday I'll create perl?
>
>James - unless I'm mistaken, 'wheel-making' is the child of Necessity
You're mistaken. One of the inherent problems with encouraging reuse is
that you're also encouraging people's ability to engineer solutions from
first principles to atrophy.
--
Andy Armstrong, Wonderworks, http://www.wonderworks.co.uk
------------------------------
Date: Tue, 05 May 1998 13:52:09 GMT
From: jdporter@min.net (John Porter)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <MPG.fb8e5012576536e9896a7@news.min.net>
On Mon, 04 May 1998 23:26:42 -0500,
in article <CUpT1IIelwLS092yn@netins.net>,
phdss@writeme.comm (phdss@writeme.comm) wrote:
>
> Sure you have compiler support? Many of the newer isp's that allow
> perl cgi wont allow C compilers to run. Mine is that way - don't
> even have shell access (ftp upload, server sets permissions, and we
> gets one write directory) - so modules are out of the question. (I
> wouldn't use them anyway).
How convenient for you! I wouldn't have an account without a shell.
> Art Cohen <upsetter@shore.net> wrote:
> >Is it any wonder why a lot of perl developers don't use pre-written
> >modules?
Faulty premise.
> /A:You can usually write the program faster than you can
> dial/dl/hangup/install/read docs/fix it/fix the fix/.
s/usually/never/
> And when
> you are done, you still only have someone elses (usually lame)
> code that will only do 75% of what you really wanted in the first
> place.
Utter b.s. How would you know? You don't use modules!
I for one would not relish the task of rewriting libwww.
And I've looked at the code; I know how solid it is.
It isn't some lame hack, as you purport.
> /b:Are other peoples code. You are either a programer or not.
The power and robustness of many modules on CPAN speak for themselves.
It doesn't matter whether they were written by a programmer, a non-
programmer, or a dog. They're good code.
> /d:Disk spam. Take libwww for instance: installing it (guessing)
> 2-4 meg of spam for what? A set of slow running subscripts that
> accomplish very little that you couldn't do faster manually.
More pure b.s. You clearly have no clue how very many hours
people like Gisle Aas have put into their modules to make them
useful, robust, and even fast.
> /e:I don't get how it works, but I'm sure modules are just another
> MLM scam. ;-) $$ Its FREE!! $$ lol.
Moron.
> On the upside, modules can be quite useful for learning and
> ripping apart. The 'ol libwww is a good example of how to do some
> things, and also how not to do some things.
Yeah, sure. Name one thing done wrong in libwww.
> -- Brett Tabke (phdss at writeme.com - fix munged reply-to)
Some people can't buy a clue.
> -- stuff http://www.netins.net/showcase/phdss/
Maybe this explains it: he thinks the Commodore is a great computer.
> ...ML: The only language worth learning in my lifetime. (I'm 35)
So the main problem with Perl is that it isn't ML?
John Porter
------------------------------
Date: Tue, 5 May 1998 06:31:45 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6in4bt$ebe@bgtnsc03.worldnet.att.net>
Andre L. wrote in message ...
>In article <6ilddd$344$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
>(Tom Christiansen) wrote:
>
>> [courtesy cc of this posting sent to cited author via email]
>>
>> In comp.lang.perl.misc,
>> Art Cohen <upsetter@shore.net> writes:
>> :People on this newsgroup are quick to say "Don't re-invent the
wheel;
>> :there's a module that already does that"...
>>
>> Another problem with that is if it goes on forever, no one will
>> ever learn how to make wheels.
>>
>> There are lessons to be learned on both sides here, folks.
>>
>> --tom
>
>
>That's refreshing to hear!
>
>Mister C., your wisdom brings me a great deal of relief.
>
>There's been plenty of UAMS ('use a module, stupid') comments in here.
I
>got the feeling that not using every module available for every
possible
>task was some kind of a sin.
>
>I rather think that blindly using ready-made routines is not the best
way
>to get to know what you're doing. Studying them, on the other hand, is
a
>great way to learn, and to figure out the best way to do it.
>
>And sometimes, a few lines of plain old perl is the best way, period.
>
>A.L.
When first learning Perl (OK, during my first few month of first
learning Perl, as opposed to the last few months of just learning Perl)
I found it very helpful to reinvent the wheel because it helped me to
see what was going on "inside Perl." As I got a bit more proficient I
found that other people had different ways of making wheels. Now I can
go get a wheel of the shelf and use it, but I understand how it was made
and what kind of road you can expect to use it on.
And every so often, it might not be a bad idea to go invent a wheel
again, just to remember how it's done.
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
------------------------------
Date: Tue, 5 May 1998 09:03:34 -0400
From: "Tim Gray" <tgray@smlny.com>
Subject: failing to interpret * on NT command line
Message-Id: <6in2nb$7ls$1@m5.stny.lrun.com>
I am trying, in WinNT, to do the simple one liner
perl -pi.bak -e 's/foo/bar/;' *
and it gives me
Can't open *: No such file or directory
I also tried *.* and *.txt. I could have sworn I have done this before. I
am using Mr. Sarathy's port of 5.004_02. Any suggestions? Thanks.
------------------------------
Date: Tue, 5 May 1998 06:37:14 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: failing to interpret * on NT command line
Message-Id: <6in4tq$gii@bgtnsc03.worldnet.att.net>
Tim Gray wrote in message <6in2nb$7ls$1@m5.stny.lrun.com>...
>I am trying, in WinNT, to do the simple one liner
>
>perl -pi.bak -e 's/foo/bar/;' *
>
>and it gives me
>
>Can't open *: No such file or directory
>
>I also tried *.* and *.txt. I could have sworn I have done this
before. I
>am using Mr. Sarathy's port of 5.004_02. Any suggestions? Thanks.
>
>
Try using double quotes. I don't know if it'll fix the * problem, but
the command interpreter doesn't seem to like single quotes.
Otherwise I think the code should work. I seem to remember using
something like it myself on occasion.
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
------------------------------
Date: Tue, 5 May 1998 06:26:03 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: How do I reuse functions in several programs?
Message-Id: <6in416$d3r@bgtnsc03.worldnet.att.net>
I remember being frustrated about this too. But, there is help. In
addition to the documentation others have mentioned to you, there's a
book called Perl By Example (or maybe it's Perl 5 By Example) that takes
you through building a module. It's not difficult, and it doesn't
require a lot of "systemy" stuff, but it does require you to plan
carefully so your module does what it's supposed to do instead of what
it isn't (like walk all over the rest of your program).
HTH
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
Keith Vertrees wrote in message <354E2ECD.4D06F7A4@comcore.com>...
>I'm new to Perl, and while I can see how it really does make some stuff
>that should be easy easy, it seems to make some easy stuff hard. If I
>want to write a subroutine that is used in multiple Perl programs, how
>do I do it? Modules seem like they might be the answer, but all that I
>can "easily" find out about modules is that they go into files with a
>.pm suffix. How do I tell my Perl program where it can file the file
>that has the .pm suffix so that it can use the function from the file
>with the .pm suffix? In C, this would be accomplished by linking a .o
>file or via a #include statement.
>
>From what I can tell about modules, they're written by really smart
Perl
>people to do all kinds of systemy stuff, but they're hard for a novice
>user to deal with.
>
>Tell me I'm wrong...
>
>Thanks,
>Keith
>
------------------------------
Date: Tue, 05 May 1998 06:54:21 -0600
From: venkat5@hotmail.com
To: venkat5@hotmail.com
Subject: how to run Perl script on remote server not having Perl interpretor
Message-Id: <6imuld$rkl$1@nnrp1.dejanews.com>
hello .....
can anyone please tell me how to run a Perl script on a remote server which
is not having Perl interpretor.
thanx. with regards.
venkat.
email : venkat5@hotmail.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 5 May 1998 11:46:54 GMT
From: scott@softbase.com
Subject: Re: how to run Perl script on remote server not having Perl interpretor
Message-Id: <6imu7e$sj6$6@mainsrv.main.nc.us>
venkat5@hotmail.com wrote:
> can anyone please tell me how to run a Perl script on a remote server which
> is not having Perl interpretor.
The Perl -> Java translator in the Perl Resource Kit might help
you, if the remote machine has a Java interpreter but not a
Perl one.
Otherwise, you'll have to rewrite your Perl script in another
language and compile or run it on the remote platform.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 5 May 1998 12:37:04 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Padding a string to be a fixed length
Message-Id: <slrn6ku1vf.hm7.Tom.Grydeland@mitra.phys.uit.no>
On Mon, 4 May 1998 20:05:22 -0400,
Mad Max <needcrew@tiac.net> wrote:
> I am new to perl and am trying to figure out how to pad a string with spaces
> to be a fixed length. I.E.
Why would you want to do that?
> $data = "My test String";
> $leftOver = length($data) - $maxLength
>
>
> I then want to add $leftOver number of spaces to the string.
$data .= ' ' x $leftOver;
> MIke
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Tue, 05 May 1998 07:41:50 -0500
From: Beck Web Servers & Design <bwsd@bwsd.com>
Subject: passing .htaccess login info
Message-Id: <354EFAFE.3B41AE92@bwsd.com>
Hi:
I need to get a script to pass the .htaccess login info to the script so
that if the username and password match in an .htaccess protected
directory, the script then performs other functions.
The user logs on with username and password...according to .htaccess
file. However, the password is encrypted in the .passwd file specified,
and also, I don't know how to trap the input variables from the pop up
login box that pops up when an .htaccess protected directory is accessed
on the web.
Any help would be appreciated. I've read and read, and can't seem to
find enough out to be able to do this.
Thanks,
Eric
------------------------------
Date: 05 May 1998 15:36:24 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: passing .htaccess login info
Message-Id: <7xlnsg96w7.fsf@beavis.vcpc.univie.ac.at>
Re: passing .htaccess login info, Beck <bwsd@bwsd.com> said:
Beck> Hi: I need to get a script to pass the .htaccess login
Beck> info to the script so that if the username and
Which scripts? Very confusing these dangling references...
Beck> password match in an .htaccess protected directory,
Beck> the script then performs other functions.
What's wrong with the server's authentication mechanism?
Why re-invent the wheel?
If you want to redefine your server's handling of requests
involving authentication you'll have to refer to the
documentation for your server.
Beck> The user logs on with username and
Beck> password...according to .htaccess file. However, the
Nope, they authenticate, they don't "log on".
Beck> password is encrypted in the .passwd file specified,
Beck> and also, I don't know how to trap the input variables
Beck> from the pop up login box that pops up when an
Beck> .htaccess protected directory is accessed on the web.
You don't know that there is a dialog box - it depends on
how the browser/user-agent implements the response to the
challenge.
A good place to start is with the following modules:
CGI
LWP (especially LWP::Authen::Basic & LWP::UserAgent)
HTTP::Request
URI::URL
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/
"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.
------------------------------
Date: Tue, 5 May 1998 13:28:16 +0100
From: "Glenn Morgan" <gmorgan@photographics.co.uk>
Subject: passing a copy of data refered to via a hard ref
Message-Id: <6in0ff$764$1@news.u-net.com>
I have created a large data structure that is refered to via a hard
reference, the following is a very small portion of this data :
$parse_tree = HASH(0x1040c24)
'ART' => HASH(0x1048040)
'ATTRIBUTES' => HASH(0x1047230)
'AID' => HASH(0x1048dc8)
'TYPE' => 'TOKEN'
'VALUE' => 466
'DOCSUBTY' => HASH(0x104ffd8)
'TYPE' => 'TOKEN'
'VALUE' => 'FLA'
'JID' => HASH(0x1048a68)
'TYPE' => 'TOKEN'
'VALUE' => 'JCVS'
'LANGUAGE' => HASH(0x1050798)
'TYPE' => 'TOKEN'
'VALUE' => 'EN'
'PII' => HASH(0x1049128)
'TYPE' => 'TOKEN'
'VALUE' => 'S0967210997001695'
'REFERS-TO' => HASH(0x1041890)
'TYPE' => 'IMPLIED'
'VALUE' => undef
'VERSION' => HASH(0x1033000)
'TYPE' => 'TOKEN'
'VALUE' => '4.1.0'
'BDY' => HASH(0x1056b48)
'ATTRIBUTES' => HASH(0x105277c)
empty hash
'DATA' => ARRAY(0x10527c4)
0 HASH(0x1056aa0)
'ATTRIBUTES' => HASH(0x1055e7c)
'ID' => HASH(0x1056968)
'TYPE' => 'IMPLIED'
'VALUE' => undef
'DATA' => ARRAY(0x10569f8)
0 HASH(0x1057e60)
'ATTRIBUTES' => HASH(0x1056c68)
empty hash
'DATA' => ARRAY(0x1056bc0)
0 'The mechanisms responsible for the weakening and
destruction of the artery wall, which lead to the formation of abdominal
aortic aneurysms, have been ...............
I want to pass a copy of this structure to a subroutine so that if I
mistakenly modify its contents it will not affect the original data, any
ideas?
Thanks
Glenn
------------------------------
Date: 05 May 1998 09:36:12 -0400
From: Kevin Lambright <kevinl@ascend.com>
Subject: Re: perl and Cisco???
Message-Id: <yhfsomosuur.fsf@ascend.com>
"Andrew Specht" <andrew@iaccess.com.au> writes:
> How do i communicate with a cisco router using perl scripts?
> I would like to add an entry to the access list using a perl script. Is this
> possible?
>
Lots of things are possible in Perl. If what you want to do can be
done via a telnet connection to the Cisco box, try the Net::Telnet module.
If it requires setting MIB variables, try the SNMP module.
We use a combination of both modules to do much configuration work for
our switches, as well as other vendors equipment.
Both can be obtained from CPAN (check www.perl.com for a CPAN entry point).
Kevin
--
------------------------------------------------------------------------------
Kevin Lambright email: kevinl@casc.com
Ascend Communications voice: 978-952-7407
1 Robbins Road fax: 978-692-1510
Westford, MA 01886
------------------------------
Date: 5 May 98 03:36:54 GMT
From: Ken Monroe <krm@rti.org>
Subject: PERL and OpenNT
Message-Id: <354EF9D6.464D9BCB@rti.org>
howdy!
Anybody using PERL with OpenNT? I'm having trouble getting #! to work
right. I've got the $PATH stuff set up so that
$OPENNT_ROOT/usr/contrib/perl is in the path but that doesn't seem to
help...
Any ideas would be appreciated.
------------------------------
Date: 5 May 1998 11:40:42 GMT
From: scott@softbase.com
Subject: Re: perl script to trans smtp mail text to html
Message-Id: <6imtrq$sj6$4@mainsrv.main.nc.us>
ageorge@best.com wrote:
> Does anyone know where I can find a script that will translate smtp mail text
> to html?
This question doesn't make a lot of sense. How do you want "smtp mail"
translated to HTML? (Or, rather, "http HTML"?) Do you want some kind of
AI package that inserts bold, italics, etc based on intuitive guesses
about where the user put emphasis? If this isn't the case, mail is just
plain text. Slap a <pre> before it and a </pre> after it and you're
done. What's so hard about that?
You could, alternatively, use Outlook as the e-mail client.
It generates HTML formatted messages.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 5 May 1998 11:44:34 GMT
From: scott@softbase.com
Subject: Re: Perl Win NT
Message-Id: <6imu32$sj6$5@mainsrv.main.nc.us>
Zoran Kovacevic (zoran@geof.ruu.nl) wrote:
> Can't locate packagename.pm in @INC
> So when I'm executing directly, perl can locate the package, but when
> I'm executing from
> a browser perl cannot locate the package.
> Does anyone know what's wrong?
The first thing is you can't execute a CGI program from a browser. If
you mean, "when I view the results of the CGI executing on the server
with my browser", then say that. If not, then that's one of your
problems. People reading your vague post have no idea which.
Likely, you haven't installed the ISAPI DLL version of Perl. You
should do this: using Perl with IIS and *NOT* using the ISAPI version
is asking for pain, hardship, and sleepless nights. It's just not meant
to be done. IIS hates standalone Perl, and will do almost anything but
run standalone Perl programs as CGI scripts. The most likely scenario
is the standalone Perl set up a bunch of environment variables
and registry settings which work great from your logon, but
can't be found from the NT equivalent of "nobody" under which
CGI scripts run.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Tue, 05 May 1998 15:19:16 +0200
From: Jakob Heinemann <Jakob.Heinemann@esavionics.se>
Subject: PERL-5.00404 and Cygwin NT installation problem
Message-Id: <354F11D3.AEACC11A@esavionics.se>
Hello !
I've ben trying to install Perl with Cygwin32 at my NT-machine.
I've already managed to build less, termcap, the groff, cvs and
rcs-packages. But when I follow the guidelines for installing perl
with Cygwin I seem to be missing some functions.
My Cygwin is CYGWIN32_NT C3PO 4.0 19.0 i586
and my Perl source is
----------------
Version 5.004_04 Maintenance release 4 for 5.004
----------------
Configuring runs ok, and make comes a good way but
when it goes for making the miniperl something goes wrong.
bash-2.01$ make
gcc2 -o miniperl miniperlmain.o libperl.a -lcygwin -lm -lc -lkernel32
libperl.a(pp_sys.o)(.text+0x6e8d):pp_sys.c: undefined reference to
`getnetbyname'
libperl.a(pp_sys.o)(.text+0x6f0f):pp_sys.c: undefined reference to
`getnetbyaddr'
libperl.a(pp_sys.o)(.text+0x6f1d):pp_sys.c: undefined reference to
`getnetent'
libperl.a(pp_sys.o)(.text+0x7107):pp_sys.c: undefined reference to
`getprotoent'
libperl.a(pp_sys.o)(.text+0x7357):pp_sys.c: undefined reference to
`getservent'
libperl.a(pp_sys.o)(.text+0x74ce):pp_sys.c: undefined reference to
`sethostent'
libperl.a(pp_sys.o)(.text+0x7512):pp_sys.c: undefined reference to
`setnetent'
libperl.a(pp_sys.o)(.text+0x7556):pp_sys.c: undefined reference to
`setprotoent'
libperl.a(pp_sys.o)(.text+0x759a):pp_sys.c: undefined reference to
`setservent'
libperl.a(pp_sys.o)(.text+0x75c3):pp_sys.c: undefined reference to
`endhostent'
libperl.a(pp_sys.o)(.text+0x7607):pp_sys.c: undefined reference to
`endnetent'
libperl.a(pp_sys.o)(.text+0x764b):pp_sys.c: undefined reference to
`endprotoent'
libperl.a(pp_sys.o)(.text+0x768f):pp_sys.c: undefined reference to
`endservent'
make: *** [miniperl] Error 1
bash-2.01$
Does any one have a clue?
Please also mail me a direct copy of your answer
Thanks :)
/Jakob :)
--
Jakob Heinemann, Software Systems
Ericsson Saab Avionics, Display- and Reconnaissance Systems
Tel. +46 (0) 13 28 42 49 Fax. +46 (0) 13 28 42 80
Box 1248, SE-581 12 Link=F6ping, Sweden
Mailto:Jakob.Heinemann@esavionics.se
------------------------------
Date: Tue, 05 May 1998 13:08:03 +0100
From: Ian Boys <boys@aspentech.com>
Subject: Re: Perl/Wall lingo question
Message-Id: <354F0123.446B@aspentech.com>
John Porter wrote:
>
> ...
>
> Let's say you had a 3-d array of numbers:
> float a[8][8][8];
> then each one can be located by a 3-d vector:
> a[2][5][1] = 0.0;
>
> ...
>
> In fortran, we have:
> real a(8,8,8)
> a(2,5,1) = 0.0
>
Nitpick: I think you meant
a(3,6,2) = 0.0
Sorry, couln't resist :-)
Ian (Who does a fair bit of programming in Fortran :-( )
------------------------------
Date: Tue, 05 May 1998 12:52:08 GMT
From: jws@dataconnection.co.uk (Jim Stalker)
Subject: Re: Personal Web Server and Perl
Message-Id: <354f0af2.15366405@172.19.1.2>
This is a PWS setup problem - you have to make some registry changes
to map a script to the correct program, in this case Perl.
The details are at http://www.pmpcs.com/support/fp/perlwithPWS.htm
Jim
On Fri, 1 May 1998 17:32:59 +0400, "Abdul Nasar"
<nasarma@emirates.net.ae> wrote:
>I have successfully installed Perl on my W95 PC . I wrote a cgi script on MS
>Personal Web Server and a submit form(which calls this script) gives an
>error
>"HTTP 1.0 / 501 NOT SUPPORTED"
>I have associated .pl files to execute perl.exe (as I got the information
>from this news group few days back). If I double-click the above script it
>is executed(it was intented to create a txt file)
>
>I am new to perl and so can anybody tell me in detail
>
>Nasar
>
>
------------------------------
Date: Tue, 05 May 1998 13:43:38 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: regex newline substitution question
Message-Id: <354F0ADE.D7601F01@shaw.wave.ca>
lou@visca.com wrote:
>
> Here's a simple little script to copy html files into text files. It
> works fine except that the first file in the directory, in
> ASCII-betical order, isn't affected by the line:
> "$line =~ s/\n+/\n/gs;",
It is, but $line only has one newline in it for the first file.
> -----------
> #!/usr/local/bin/perl -w
> use strict;
> use diagnostics;
>
> my @a = <c:/visca/cgi/cgi-help/*.html>;
> for (@a) {
> unless (-d $_) {
> my $textname = $_;
> $textname =~ s/\.html/\.txt/;
> open(HTML, "$_") or die "Can't open $_ because $!";
> my @html = <HTML>;
Fill array @html with contents of file, _one record per element_. For
the first file, the record separator is "\n".
> open(TEXT, ">$textname") or die "Can't create $textname because $!";
> my $line = '';
> foreach $line (@html) {
Loop through each record in @html. Note that for the first file, $line
has at most one newline since that was the record separator.
> $/ = '';
Reset record separator to paragraph mode. For files read after this,
you can get multiple newlines in $line. Move this line to before the
first file read.
[rest trimmed]
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Tue, 05 May 1998 12:57:39 GMT
From: mk@eradic8.dk (Michael Kristensen)
Subject: Scheduling a perl script under NT, makes stat() return 1 no matter what!?
Message-Id: <354f0a0f.22040212@news.uni-c.dk>
I have made this function to automatically delete some files if they
become more than a week old, in conjunction with some archivelogs to
an Oracle database:
------------
opendir(DIR, $directory);
@arch_files = sort(grep(/001$/, readdir(DIR)));
closedir(DIR);
foreach (@arch_files) {
$mtime = (localtime((stat($_))[9]))[3];
if (($mtime-7) >= 0) {
system "cmd /c del $directory\\$_\n";
}
}
-------------
If I run this script manually it does delete the files as it is
surpose to do. But if I set the Windows NT Scheduler to run the
script, it doesn't.
It seems that stat() returns 1 on all files, no matter what the real
motification date is.
I've tried to run the Schedule service, both as "localsystem" and as a
specific account, but with no luck.
Any help would be appreciated. Please also reply by e-mail, since I
don't read this conference often.
Thanks in advance,
Michael
-----------------------------------------------------------------------------
Michael Kristensen
E-mail: mk@eradic8.dk
ICQ UIN: 478933
Homepage: http://www.cyberjunkie.com/mk
-----------------------------------------------------------------------------
------------------------------
Date: Tue, 05 May 1998 14:12:59 +0200
From: Lars Chr Hausmann <36haus@but.auc.dk>
Subject: What it perl?
Message-Id: <354F024B.6EC5@but.auc.dk>
Hello!
I have to write something about, what Perl is.
I need some crystal clear info about, what perl is. So if any of you
would be so kind just to mail. Then I would be grateful!
Yours Lars
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2501
**************************************