[6656] in Perl-Users-Digest
Perl-Users Digest, Issue: 281 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 11 16:17:28 1997
Date: Fri, 11 Apr 97 13:00:29 -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 Fri, 11 Apr 1997 Volume: 8 Number: 281
Today's topics:
ANNOUNCE: BSD::Resource 1.05 <jhi@alpha.hut.fi>
associated arrays <dmorgan@nght.demon.co.uk>
BOOK: Objects on the Web <fburke@fsb.superlink.net>
Re: BOOK: Objects on the Web <tchrist@mox.perl.com>
compiled pel5 <dmorgan@nght.demon.co.uk>
DBD::DB2 0.63 is released ()
errors making test for perl 5.003 on Sequent pptse@uswnvg.com
frameset <dbaker@dkburnap.com>
Re: Help on integer segmenting into an Array <merlyn@stonehenge.com>
HELP: Launching exec's from WIn-NT server dedwelle@cisco.com
Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc) <Chris.King@swindon-fc.demon.co.uk.mars>
Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc) (M.J.T. Guy)
Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc) <merlyn@stonehenge.com>
Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc) (A. Deckers)
HTML document title <dbaker@dkburnap.com>
Re: HTML document title <tchrist@mox.perl.com>
If Else construct? (Laurel Shimer)
Re: Need info on Larry, Tom, Randy, etc. (I R A Aggie)
Newbie Needs HELP!!! Comparing Arrays <scs@huron.net>
Re: Newbie Needs HELP!!! Comparing Arrays <tycage@infi.net>
Re: Newbie Needs HELP!!! Comparing Arrays <scsREMOVE@huron.net>
Re: Ousterhout and Tcl lost the plot with latest paper <tchrist@mox.perl.com>
Parsing multiple lines (The Whopper)
Re: Perl and FTP ???? (I R A Aggie)
Re: Perl execute on load? (A. Deckers)
Re: Perl5 sin function has dain bramage ?!?!?!?!? <aewindhorn@re.ra.rockwell.com>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Cyber Surfer)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <david@nospan.netright.com>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <oakley@healthcare.com>
Re: Running Perl script w/i Unix Shell Script (I R A Aggie)
Re: sendmail equivalent for MS-DOS/Windows? (Cornelius Griffin)
Substitution of variables within array contents <kipp.e.howard@boeing.com>
Re: system LIST && die NOT system LIST || die ?? (M.J.T. Guy)
Re: Unix and ease of use (WAS: Who makes more ...) (Kevin Handy)
Re: Unix and ease of use (WAS: Who makes more ...) (Jettero Heller)
Re: Why are no elements returned from split(/X/,'')? (Kevin Buhr)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Apr 1997 18:30:24 GMT
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: ANNOUNCE: BSD::Resource 1.05
Message-Id: <5im000$2or$1@nadine.teleport.com>
The module BSD::Resource has been updated to version 1.05.
Issues addressed in this release:
- portability
(now: AIX, Digital UNIX, FreeBSD, HP-UX, IRIX, Linux, Solaris, SunOS)
- 64-bit resource limits (Digital UNIX, FreeBSD, IRIX)
- object oriented interfaces added: $ru->stime
- more rlimits recognized (NPROC, MEMLOCK)
- get_rlimits() function to list all the available rlimits
- documentation enhancements
The BSD::Resource gives an interface to the BSD process resource and
priority control functions
getrusage()
getrlimit() setrlimit()
getpriority() setpriority()
Enjoy.
--
$jhi++; # Jarkko Hietaniemi <URL:http://www.iki.fi/~jhi/>
# To each is given a bag of tools, A shapeless mass, and a book of rules,
# And each must make, ere life is flown, A stumbling-block or stepping-stone.
------------------------------
Date: Fri, 11 Apr 1997 19:40:36 +0100
From: DJ Morgan <dmorgan@nght.demon.co.uk>
Subject: associated arrays
Message-Id: <Z6s9SAAkWoTzEwtk@nght.demon.co.uk>
I'am a newbie to perl and require some help
I'm using perl5 under NT
The problem is I'm tring to process two simple flat files and merge them
together.
File 1
1234 Field1 Field2 field3
1234 Field1 Field2 field3
1234 Field1 Field2 field3
2222 Field1 Field2 field3
2222 Field1 Field2 field3
2222 Field1 Field2 field3
4444 Field1 Field2 field3
File 2
1234
2222
4444
Output required
1234
Field1
Field2
Field3
2222
Field1
Field2
Field3
4444
Field1
Field2
Field3
I want to use associated arrays so that I can look up the values in
File2 and get the corresponding values from file 1
Would some kind person provide help
Many thanks in advance..
--
DJ Morgan
------------------------------
Date: Fri, 11 Apr 1997 11:59:41 -0500
From: Fauzia Burke <fburke@fsb.superlink.net>
Subject: BOOK: Objects on the Web
Message-Id: <334E6DFD.2DA2@fsb.superlink.net>
There's a new book from McGraw-Hill: Objects on the Web. You can find
the TOC and an excerpt at:
http://www.smartbooks.com/bw704objweb.htm
Hope this is useful.
fburke@fsb.superlink.net
------------------------------
Date: 11 Apr 1997 18:58:26 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: BOOK: Objects on the Web
Message-Id: <5im1ki$ilp$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Fauzia Burke <fburke@fsb.superlink.net> writes:
:There's a new book from McGraw-Hill: Objects on the Web. You can find
:the TOC and an excerpt at:
:http://www.smartbooks.com/bw704objweb.htm
:Hope this is useful.
It isn't. From reading the table of contents, I can find nothing to
do with Perl -- which is itself remarkable, considering the LWP and CGI
object modules.
So is this just depicable marketing spam, or am I missing something?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Make is like Pascal: everybody likes it, so they go in and change it. "
--Dennis Ritchie
------------------------------
Date: Fri, 11 Apr 1997 19:48:10 +0100
From: DJ Morgan <dmorgan@nght.demon.co.uk>
Subject: compiled pel5
Message-Id: <TaP$qEAqdoTzEwP$@nght.demon.co.uk>
Hi All you Perl Guru's
I have a simple question for you.
I understand that you can compile perl scripts under unix so to save
execution speed and to stop people reading the script. How ?
Many thanks in advance
--
DJ Morgan
------------------------------
Date: 11 Apr 1997 18:30:00 GMT
From: mhm@dax.austin.ibm.com ()
Subject: DBD::DB2 0.63 is released
Message-Id: <5ilvv8$2oh$1@nadine.teleport.com>
The new version of DBD::DB2, now winding its way to CPAN, has
the following features:
Created a small pod for DBD::DB2. Hopefully, this
will lighten the email load.
Rolled in all the changes needed to make it compile cleanly
on Solaris
Output Parameters for stored procedures now work.
--
----------------------------------------------------------------------
Michael H. Moran | Standard Disclaimer: The content
mhm@austin.ibm.com | of this posting is independent of
IBM Corporation, Austin, Texas | official IBM position.
------------------------------
Date: Fri, 11 Apr 1997 11:41:36 -0600
From: pptse@uswnvg.com
To: pptse@uswnvg.com
Subject: errors making test for perl 5.003 on Sequent
Message-Id: <860776172.6995@dejanews.com>
Hi,
I am trying to compile perl5.003 on Sequent running Dynix/Ptx 4.1.3.
I have managed to get it to compile and make minitest went fine. But
when I tried to make test, I got the following error message:
lib/ndbm.......Can't load '../lib/auto/NDBM_File/NDBM_File.so' for module
NDBM_File: Unknown error - dlerror() not implemented at
../lib/DynaLoader.pm line 140. at ../lib/NDBM_File.pm line 17 FAILED on
test 0
Any suggestions? I used dlopen.xs in config.sh and I linked the program
with lseq, lm and ldl. Thanks in advance.
Philip Tse
pptse@uswnvg.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 9 Apr 1997 18:12:02 GMT
From: "David Baker" <dbaker@dkburnap.com>
Subject: frameset
Message-Id: <01bc4511$75dcdaa0$c7a3bece@micronclientpro.dkburnap.com>
I need to bust out of a frameset when specific criteria is achieved. How
does the syntax look in the location: command?
print "Location:../sreg/login.htm target='_top'\n\n";
This isn't working...
Thanks,
David
------------------------------
Date: 11 Apr 1997 10:49:29 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: leonstep@cedep.com
Subject: Re: Help on integer segmenting into an Array
Message-Id: <8cpvw15u1i.fsf@gadget.cscaper.com>
>>>>> "Leon" == Leon Stepanian <leonstep@cedep.com> writes:
Leon> Hi there:
Leon> Here's the problem.
Leon> $hold could have any value from 1 - 4 digits long such as:
Leon> 8 or
Leon> 16 or
Leon> 134 or
Leon> 2567
Leon> I have to get integer values held in $hold into an array under their
Leon> seperate digits such as:
Leon> for for for for
Leon> 8 16 134 2567
Leon> @array[0] 0 0 0 2
Leon> @array[1] 0 0 1 5
Leon> @array[2] 0 1 3 6
Leon> @array[3] 8 6 4 7
Ouch. Don't say @array[0]... it hurts my eyes. That's $array[0].
But here ya go:
@array = split //, sprintf "%04d", $hold;
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 507 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Fri, 11 Apr 1997 10:44:10 -0700
From: dedwelle@cisco.com
Subject: HELP: Launching exec's from WIn-NT server
Message-Id: <334E786A.118A@cisco.com>
Hello,
I am trying to launch an installation (setup.exe) executable from a web
page. Is there an HTML solution? I have tried writting a PERL script
for NT, but I have run into several problems. My PERL script is located
in the servers cgi-bin directory, but I seem to be running into several
road-blocks. Any suggestions on a method would be appreciated. Also,
can I use the #! to refernce my perl compiler in NT?
Thanks,
-Denzil
dedwelle@cisco.com
------------------------------
Date: Fri, 11 Apr 1997 16:48:48 +0100
From: Chris King <Chris.King@swindon-fc.demon.co.uk.mars>
Subject: Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <84HxGAAg1lTzEwYy@swindon-fc.demon.co.uk>
In article <5ijn23$73m@netnews.upenn.edu>, Digital Psychosis
<omard@pixmap.seas.upenn.edu> writes
>name one thing windows is better thanunix in?
Crashing?
--
Chris King
The similarity of any fact mentioned within this post and
any in reality, living or dead, is purely coincidental.
Remove 'mars' from address when replying. I hate spam.
I like corned beef though.
------------------------------
Date: 11 Apr 1997 18:46:23 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <5im0tv$nbr@lyra.csx.cam.ac.uk>
Digital Psychosis <omard@pixmap.seas.upenn.edu> wrote:
>name one thing windows is better thanunix in?
Making money for its perpetrators?
Mike Guy
------------------------------
Date: 11 Apr 1997 12:02:14 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: omard@pixmap.seas.upenn.edu (Digital Psychosis)
Subject: Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <8cvi5t4c3t.fsf@gadget.cscaper.com>
>>>>> "Digital" == Digital Psychosis <omard@pixmap.seas.upenn.edu> writes:
Digital> name one thing windows is better thanunix in?
Making money for Microsoft?
:-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 507 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 11 Apr 1997 19:27:58 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <slrn5kt45u.amv.Alain.Deckers@nessie.mcc.ac.uk>
In <5ijn23$73m@netnews.upenn.edu>,
Digital Psychosis <omard@pixmap.seas.upenn.edu> wrote:
>name one thing windows is better thanunix in?
Crashing.
You make it too easy. :-)
Alain
------------------------------
Date: 9 Apr 1997 16:24:58 GMT
From: "David Baker" <dbaker@dkburnap.com>
Subject: HTML document title
Message-Id: <01bc4502$813c6000$c7a3bece@micronclientpro.dkburnap.com>
What is the best way to get this inf. from Perl?
Thanks,
David
------------------------------
Date: 11 Apr 1997 19:33:30 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: HTML document title
Message-Id: <5im3ma$lu3$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "David Baker" <dbaker@dkburnap.com> writes:
:What is the best way to get this inf. from Perl?
You read my /perl/scripts/html-hacking.html at {ftp,www}.perl.com
or at my CPAN directory and learn that even though the
perl -n -0777 -e 'print "$1\n" if m#<title>(.*?)</title>#si' file.html
isn't too bad, that the following is a more complete and proper solution:
#!/usr/bin/perl
# htitle -- get html title
# orig by Gisle Aas, hacked up by
# Tom Christiansen for delayed loading
# for faster error messages and for multiurl handling.
die "usage: $0 url ...\n" unless @ARGV;
require LWP;
LWP->import(5.00);
foreach $url (@ARGV) {
$ua = new LWP::UserAgent;
$res = $ua->request(HTTP::Request->new(GET => $url));
print "$url: " if @ARGV > 1;
print $res->title, "\n";
}
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"It's ironic that you would use a language as large as English to express
so small a thought."
--Larry Wall
------------------------------
Date: Fri, 11 Apr 1997 12:53:28 -0700
From: autopen@quake.net (Laurel Shimer)
Subject: If Else construct?
Message-Id: <autopen-1104971253280001@l94.d22.quake.net>
Please do not read any unplanned satire into this question. There is none
intended. The problem may be that I'm not finding the original thread.
QUESTION
---------
I don't really understand what you are saying here, Stevan.
I guess you are saying to avoid the if (...){} construct because it's hard
to maintain code like this. (Darn right)
If (pet eq "animal") {
If (pet eq "dog") {
If (pet eq "poodle") {
pet the pet;
feed the pet;
walk the pet;
}
If (pet eq "spaniel") {
......
}
......
}
If (pet eq "cat") {
......
If (pet eq "vegetable") {
etc.
....
But I'm not clear exactly how you are recommending the use of $arg eq "-n"
or $arg = "-n" to replace this style of programming?
Laurel
BACKGROUND
-----------------
In article <E85ywL.GAC@world.std.com>, swmcd@world.std.com (Steven W
McDougall) wrote:
> Alasdair Thomson <alasdairt@private.nethead.co.uk> writes:
>
> >I'm sorry, but the use of the "incredibly passe" if (...){} construct at
> >least makes it obvious what it's attempting to do, and ensures that LESS
> >MISTAKES happen during coding.
>
> I usually avoid religious discussions, but I have to do a little
> proselytizing here. || can be a bit cryptic to the uninitiate, and has
> precedence problems besides. But in perl5 you can write
>
> $arg eq "-n" or $arg = "-n"
>
> This is reasonably intuitive and has the right precedence.
>
> More importantly, it keeps the conditional local to the statment,
> where it belongs, instead of creating an entire block context that I
> have to keep track of in my head.
>
> >Perhaps that's the difference between people that muck around with
> >languages at college and people who's jobs depend upon them.
>
> Ob. credentials
> I've spent many, many hours of my life suffereing over other
> people's bad code. And one of the most common problems is deeply
> nested if-then-else constructs.
>
> - SWM
--
The Reader's Corner: Mystery, Romance, Fantasy
http://www.autopen.com/index.shtml
Subscribe to our free StoryBytes publication
New: Fashion Challenges for the Time Traveling Heroine http://www.autopen.com/romance.well.dressed.shtml
------------------------------
Date: Thu, 10 Apr 1997 11:13:27 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Need info on Larry, Tom, Randy, etc.
Message-Id: <fl_aggie-ya02408000R1004971113280001@news.fsu.edu>
Randy? RANDY?
Heheheheheh...Randy...I like that... :)
James - this ought to be good...
--
Consulting Minster for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 11 Apr 1997 17:29:13 GMT
From: "Stephen Hill" <scs@huron.net>
Subject: Newbie Needs HELP!!! Comparing Arrays
Message-Id: <01bc469d$23e12a20$0c91e9cd@garcia.huron.net>
I have the following array:
@lines
<message19." VALUE="message19.html"><A
HREF="http://www.huron.net/~mailtest/message19.html"> Hi there!!!</A>
<message20." VALUE="message20.html"><A
HREF="http://www.huron.net/~mailtest/message20.html"> Test message!!</A>
<message21." VALUE="message21.html"><A
HREF="http://www.huron.net/~mailtest/message21.html"> Help!!!!</A>
and the following array:
@files
message21.html, message19.html
I want to be able to compare the two, if @lines[$i] doesn't not have any of
the elements for the @files array I wan to be able to print it out.
I have tried for many many many hours, and still can't get it to work
properly, one of my attempts is below:
foreach $save(@lines)
{
foreach $file(@files)
{
if ($save =~/$file/)
{last;}
print "file to be saved $save";
}
}
This works fine if there is only one element in the @files array, but if
there is more than one it does not work properly.
Is there a SIMPLE way to do the following statement?
ENGLISH
If @lines does not have any of the elements of @files
Perl
If (@lines !~/@files[ # if there is some special thing I could use here to
specify every element it would be great :-)
Hope I have made myself clear :-)
Any help will be VERY appreciated, I have spent many many hours on this
problem.......and there has to be a simple solution.
Thanks......Please email your response.
------------------------------
Date: Fri, 11 Apr 1997 15:13:50 -0400
From: Ty Cage Warren <tycage@infi.net>
To: Stephen Hill <scs@huron.net>
Subject: Re: Newbie Needs HELP!!! Comparing Arrays
Message-Id: <334E8D6E.77D8E86F@infi.net>
[CCed to Stephen Hill <scs@huron.net> because I'm a nice guy]
Stephen Hill wrote:
>
> I have the following array:
>
> @lines
> <message19." VALUE="message19.html"><A
> HREF="http://www.huron.net/~mailtest/message19.html"> Hi there!!!</A>
> <message20." VALUE="message20.html"><A
> HREF="http://www.huron.net/~mailtest/message20.html"> Test message!!</A>
> <message21." VALUE="message21.html"><A
> HREF="http://www.huron.net/~mailtest/message21.html"> Help!!!!</A>
>
> and the following array:
>
> @files
> message21.html, message19.html
>
> I want to be able to compare the two, if @lines[$i] doesn't not have any of
> the elements for the @files array I wan to be able to print it out.
Ok I think I can actually help this time. :)
---------------------------------------------------
foreach $save (@lines) {
my($isinit) = grep { $save =~ /$_/ } @files;
print "file to be saved $save\n" if (!$isinit);
}
---------------------------------------------------
I ran it on the data you supplied and got this
---Output---
file to be saved <message20." VALUE="message20.html"><A
file to be saved HREF="http://www.huron.net/~mailtest/message20.html">
Test message!!</A>
-End Output-
I think that was what you were asking for.
Hope this helps,
Ty
--
+---+
Ty Cage Warren tycage@infi.net
Systems Engineer InfiNet
Homepage: http://tazer.engrs.infi.net/~tycage
PGP Public Key: http://tazer.engrs.infi.net/~tycage/pgpkey.html
PGP Fingerprint: FF C1 28 CA 80 B5 31 78 B1 24 2E 8C AB DA FB D2
------------->Never invoke anything bigger than your head.<-------------
------------------------------
Date: 11 Apr 1997 19:22:05 GMT
From: "Stephen Hill" <scsREMOVE@huron.net>
Subject: Re: Newbie Needs HELP!!! Comparing Arrays
Message-Id: <01bc46ac$ecae5ae0$0c91e9cd@garcia.huron.net>
I did it!!! Not sure how many cups of coffee were comsumed figureing it
out :-)
In case you are interested, this is how I got it to work...
for ($i = 0; $i <=$f; $i++)
{
foreach $file (@files)
{
if (@lines[$i] =~/$file/)
{
@lines[$i] = ();
}
}
}
I knew the solution would be simple :-)
Thanks anyway everyone :-)
------------------------------
Date: 11 Apr 1997 17:41:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5ilt3e$n1m$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
rv@erix.ericsson.se (Robert Virding) writes:
:A final question which has long interested me and which seems relevant
:to this whole discussion: who would use Tcl if it DIDN'T have such a
:integrated interface to Tk?
The people using it for expect.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
With a PC, I always felt limited by the software available. On Unix, I am
limited by my knowledge. --Peter J. Schoenster <pschon@baste.magibox.net>
------------------------------
Date: 11 Apr 1997 18:40:49 GMT
From: lgw@cs.buffalo.edu (The Whopper)
Subject: Parsing multiple lines
Message-Id: <5im0jh$1dl@prometheus.acsu.buffalo.edu>
I am a newcomer to Perl, and I have been assigned to write a log examiner
for one of the NT servers at my workplace. The program will examine the
SYS$LOG.ERR file for certain keywords, and then report on them.
My problem lies within the fact that the entries in the log are 2,3, even
four lines long. As a newcomer, I do not know how to read in multiple
lines to my Perl script. Here is an example of one entry:
2/1/95 3:01:24 pm Severity = 4.
1.1.72 ALTFS1 TTS shut down
because backout volume SYS was dismounted
I need to separate the date, time, severity, and full error message into
their own variables. Any help would be greatly appreciated.
Thank you,
Larry
--
*********************************************************************
Larry G. Wapnitsky - The Whopper - http://www.cs.buffalo.edu/~lgw
e-mail: lgw@cs.buffalo.edu - Computer Science - SUNY at Buffalo
lgw@cit.buffalo.edu - CIT/LAN Systems - SUNY at Buffalo
------------------------------
Date: Thu, 10 Apr 1997 09:37:24 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Perl and FTP ????
Message-Id: <fl_aggie-ya02408000R1004970937240001@news.fsu.edu>
In article <01bc2da3$41dc3140$314078c3@pelati>, "Matteo Pelati"
<pelatimtt@poboxes.com> wrote:
[posted && cc'd]
+ I'd like to know if it possible to use perl commands ( for instance
+ readdir, open ) when I'm connected to an ftp site and see the ftp archive
+ as a local hard drive. If it's possible how can I tell perl to do that?
You mean like:
NAME
Net::FTP - FTP Client class
SYNOPSIS
use Net::FTP;
$ftp = Net::FTP->new("some.host.name");
$ftp->login("anonymous","me@here.there");
$ftp->cwd("/pub");
$ftp->get("that.file");
$ftp->quit;
[snipsnip]
ls ( [ DIR ] )
Get a directory listing of DIR, or the current
directory.
Returns a reference to a list of lines returned from the
server.
dir ( [ DIR ] )
Get a directory listing of DIR, or the current directory
in long format.
Returns a reference to a list of lines returned from the
server.
Part of the netlib package.
James
--
Consulting Minster for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 11 Apr 1997 19:23:36 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: Perl execute on load?
Message-Id: <slrn5kt3to.amv.Alain.Deckers@nessie.mcc.ac.uk>
In <01bc44e3$fa9ba2e0$c7a3bece@micronclientpro.dkburnap.com>,
David Baker <dbaker@dkburnap.com> wrote:
>How can I get a Perl script to activate when a document is loaded? SSI is
>not an option.
If you stop to think for a moment, you'll realise that this is not a Perl
question, and as such should not have been published in
comp.lang.perl.misc. (Hint: would your question have been any different
if your script had been written in Tcl, awk, sed, sh, etc.?)
This question belong somewhere in the comp.infosystems.www.authoring.*
groups. Followups set accordingly.
Cheers,
--
Alain.Deckers@man.ac.uk <URL:http://www.man.ac.uk/%7Embzalgd/>
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: 11 Apr 1997 11:08:53 -0500
From: Allen Windhorn <aewindhorn@re.ra.rockwell.com>
Subject: Re: Perl5 sin function has dain bramage ?!?!?!?!?
Message-Id: <u912pv8x6.fsf@re.ra.rockwell.com>
"David J. Topper" <topper@panix.com> writes:
> and my output is:
>
> sin(6.28318530717959) = -2.44929359829471e-16
> sin(360) = 0.958915723414307
>
My calculator gives sin(2*pi) = 4.1352e-13, so not only is it the
wrong value, it's the wrong sign! :-)
Actually, that looks pretty close for a trigonometric function
approximation, in fact two trigonometric approximations since you used
atan to get the value of pi. If you want exactly zero you probably
have to go to MatLab or something.
Allen
--
Allen Windhorn
Kato Engineering (A Rockwell Automation Company)
P.O. Box 8447 tel: (507) 345-2782
N. Mankato, MN 56002-8447 FAX: (507) 345-2805
------------------------------
Date: Fri, 11 Apr 1997 19:34:42 +0100
From: cyber_surfer@gubbish.wildcard.demon.co.uk (Cyber Surfer)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <MPG.db84f3fec9968de98975f@news.demon.co.uk>
With a mighty <5iki55$m98$2@news2.gte.net>,
marduk@gte.net uttered these wise words...
> Why does everyone insist on crossposting to every damn newsgroup in
> existance?
I wish I knew. Memetic drift? Competing memes might explain massive
crossposting, along with many (other) non-rational behaviours.
What I wonder why you set your followups to alt.test without warning
anyone? This could be interpreted as a non-rational behaviour, similar
to spamming with forged headers, and other malicious tricks. Did you
hope to derail this thread? Why? What could you gain that a killfile
can't accomplish far more effectively?
I wish I knew...
--
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
Martin Rodgers | Programmer and Information Broker | London, UK
Please note the "gubbish" in my email address.
------------------------------
Date: Fri, 11 Apr 1997 14:17:45 -0500
From: David Hanley <david@nospan.netright.com>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334E8E59.6AFD@nospan.netright.com>
Henry Baker wrote:
>
> In article <E8H3sq.Jt6@research.att.com>, ark@research.att.com (Andrew
> Koenig) wrote:
> > In article <01bc45d3$cdf47fa0$03d3c9d0@wjh_dell_133.dazsi.com> "Bill
> House" <bhouse@dazsi.com> writes:
> > > Hype alone won't make an intelligent shopper buy, ...
> >
> > But hype alone will sometimes make the intelligent shopper's boss' boss buy,
> > which is the same thing from the hype merchant's viewpoint.
> >
> > I've seen the phenomenon in action as long as I've been involved
> > in computing, which is more than a quarter century at this point.
> > It applies equally to hardware, software, languages, tools, and
> > methodologies.
>
> Amen!
>
> Dogfood: That which a dog eats, but his master buys.
Sorry, But I'm a developer, and I picked my development language,
enviornemnt and tools, all by my lonesome.
dave
------------------------------
Date: Fri, 11 Apr 1997 11:39:51 -0600
From: Bryan Oakley <oakley@healthcare.com>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334E7767.63DECDAD@healthcare.com>
John Ousterhout wrote:
> OK, enough is enough. I can see that I'm not going to be able to fool you
> guys. I confess everything. You're right. It all *was* an evil
> conspiracy. There really isn't a shred of merit in Tcl, or C++, or Perl,
> or C; there is not a single reason on earth why anyone should use any of
> these languages for any programming task. Scheme truly is the perfect
> language that solves every problem and combines the virtues of every
> other language. For years we've been plotting to trick programmers into
> using bad languages. Yes, I mean "we". Many many people have participated
> in this sinister plot, including Larry Wall, Dennis Ritchie, Bill Gates,
> the Bureau of ATF, most of the LAPD, and Mark Fuhrman (sorry you guys, but
> the truth has overwhelmed me so I've been forced to expose you). I feel
> just terrible at how I have set the programming world back, and I promise
> to be a good boy from now on.
>
> Now that that's over with, you can all get back to work now.
BRAVO!
--
Bryan Oakley mailto:oakley@healthcare.com
Software Engineer http://www1.clearlight.com/~oakley/
Healthcare Communications, Inc. http://www.healthcare.com/
------------------------------
Date: Thu, 10 Apr 1997 11:10:00 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Running Perl script w/i Unix Shell Script
Message-Id: <fl_aggie-ya02408000R1004971110000001@news.fsu.edu>
In article <5iiq0f$d0a@cronkite.ocis.temple.edu>,
david@temss2.main.temple.edu (David Tucker) wrote:
+ Can you run a perl script within a UNIX shell script without having
+ to preface all Perl variables starting with a $ i.e. $a with
+ a backslash i.e. \$a.
Huh? I know what you mean, but I don't understand why you're trying to
do it that way.
I usually just feed something like:
~/bin/example.pl
to the shell. That could be wrapped up within a shell script.
But why are you trying to run a perl script within a shell script? wouldn't
it be easier/better to replace the shell script in its entirety with a
perl script?
Unless it's a one-time, knock-off foreach loop.
James - the only shell "scripts" I write any more are one-timers...
--
Consulting Minster for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: Fri, 11 Apr 1997 13:17:32 -0700
From: EScrubb@worldnet.att.net (Cornelius Griffin)
Subject: Re: sendmail equivalent for MS-DOS/Windows?
Message-Id: <MPG.db83c32468c8a84989680@netnews.worldnet.att.net>
In article <334e492a.1238446@news.saix.net>, posenj@lancet.co.za says...
> I need something that I can se to send mail from within my Perl script.
Clipped from FAQ>>>>>>>>>>>>>>>>>>>>>>>>
4.5. What's the equivalent of sendmail for Win32?
Neither Windows 95 and Windows NT ships with a command-line SMTP client
like "sendmail" in UNIX. Several exist, however. One popular one is BLAT,
which is available in the Windows NT Resource Kit, and on the Web at this
URL:
http://gepasi.dbs.aber.ac.uk/softw/Blat.html
Note that the command line syntax for BLAT is different from of
"sendmail".
Microsoft has a port of sendmail available on their FTP site at:
ftp://ftp.microsoft.com/developr/drg/unix-to-windows/ports/sendmail/
A commercial sendmail product is available from MetaInfo, Inc., at:
http://www.metainfo.com/
There is an evaluation version available for download.
Another commercial mail product is wrmail, part of the slmail product
from Seattle Labs. A free version is available at
http://www.seattlelab.com/
A Perl script for sending mail without using an external program is also
available on Robin Chatterjee's Perl for Win32 page (see question 3.4).
End of clip from FAQ>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
BTW, do you have trouble using multiple switches, e.g. -s or -t with the
system() function? I am using blat right now and the system() command
seems to only take the first command and none of the switches I use in
that command afterwards. Any Ideas, let me know? Thanks.
Cornelius
------------------------------
Date: Fri, 11 Apr 1997 18:02:58 GMT
From: "Kipp E. Howard" <kipp.e.howard@boeing.com>
Subject: Substitution of variables within array contents
Message-Id: <334E7CD2.41DC@boeing.com>
I have a file I read in that contains data which could include some
variables. Here is an example of the contents of this file:
/u1/$user_account/public_html
${first_name}_${last_name}
Now I would like to read this file and make substitutions on those
variables
and have that information stored in an array.
I'm actually trying to do this in an object where I want to be able to
substitute instance variables.
Using Tom's perltoot discussion on "Autoloaded Data Methods" I have
created an _permitted instance variable that contains a hash of all
the permitted instance variables that can be accessed via like named
methods. Here is an example of its contents:
$self->{_permitted} = (
first_name => "Kipp",
last_name => "Howard",
user_account => "keh",
);
Say that I have read the above file contents into an array reference:
$self->{user} = ["/u1/$user_account/public_html",
"${first_name}_${last_name}",
];
Now using the "_permitted" variables, I want the results to look like
this:
$self->{user} = ["/u1/keh/public_html",
"Kipp_Howard",
];
What would be the most efficient way to make these substitutions
taking into account time efficiency and maintainer efficiency? I'm
really intereseted in time efficiency but I should always be thinking
about maintainer efficiency also.
How could this be done if $self->{users} were a reference to a hash
and you wanted to allow the keys of the hash to have variable
substitutions.
Here are a few ways that this could be done:
foreach $item (@{$self->{user}}) {
if ($actions{'execute'} =~ /\$/) {
foreach (keys %{$self->{_permitted}}) { # Loop through _permitted
s/\${?$_}?/$self->{$_}/g; # but use instance vars
}
}
}
Another way that should work would be to determine all variables needed
in the array and then create variable with those names and then do an
eval
somehow on the array and assign the results to the original array. I
haven't
been able to come up with something that works for this one. Any ideas?
Sorry if this is a little confusing and thanks for any help.
--
\ Kipp E. Howard | Voice: (206) 662-4932 Fax: (206)
662-4404 /
|\ Boeing Commercial Airplanes | Internet:
keh3985@aw101.iasl.ca.boeing.com /|
|/ P.O. Box 3707, M/S 19-MH | Stable :
kipp.e.howard@boeing.com \|
/ Seattle, WA 98124-2207 | WWW:
http://www.iasl.ca.boeing.com/~keh3985 \
------------------------------
Date: 11 Apr 1997 18:31:32 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: system LIST && die NOT system LIST || die ??
Message-Id: <5im024$mg9@lyra.csx.cam.ac.uk>
Ken Anderson <anderson@necsys.gsfc.nasa.gov> wrote:
>
>page 154 of the llama book indicates that
>
>system LIST
>
>works "backwards from normal Perl operator convention"
>in that the example shown indicates it should be used like
>this:
>
> system LIST && die LIST;
>
>as opposed to a "normal" construct:
>
> perl-operator LIST || die LIST;
>
>
>This is, i'm sure, the source of my current problem,
>but i still don't quite "get it". Can anyone explain?
You may also be suffering from operator precedence problems. Note that
the above example is interpreted as
system ( LIST && die LIST );
which is almost certainly not what you want. Instead, either write
system ( LIST ) && die LIST;
or the more modern
system LIST and die LIST;
Mike Guy
------------------------------
Date: 11 Apr 1997 18:28:43 GMT
From: kth@srv.net (Kevin Handy)
Subject: Re: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <5ilvsr$p3i@mars.hyperk.com>
In article <5ili63$kad$1@earth.execpc.com>, madings@earth.execpc.com says...
>Besides, "lines of code" is an absolutely horrible way to measure
>source code. Different indentation standards can as much as
>double the number of lines of code in programs that are syntactically
>exactly the same. (Plus there's the issue of how much comments are
>used.)
>
>A slightly better count would be "words of code", using a program
>like Unix's "wc" to count the words. That way, extra blank lines
>and different indentation techniques would not affect the count.
>
>The best way to count code would be to have something hooked into
>the compiler so that the 'lex' part of the compiler could tell you
>how many distinct 'tokens' were encountered. This would be easy to
>implement too, and has the added advantage of being able to ignore
>the comments easily.
I read a book "Programming pearls" some time back, that had an
example of a Cobal program that used code as the following:
(I'm just faking up the actual code, but it was cobol and I'm
not a colol programmer)
TOTAL_0 = 0
TOTAL_1 = 0
...
<many lines snipped>
...
TOTAL_999 = 0
LOOP INPUT ITEM
IF DONE GOTO TOTALS
IF ITEM = 0 THEN TOTAL_0 = TOTAL_0 + 1
IF ITEM = 1 THEN TOTAL_1 = TOTAL_1 + 1
...
<many lines snipped>
...
IF ITEM = 999 THEN TOTAL_999 = TOTAL_100 + 1
GOTO LOOP
TOTALS PRINT "COUNT OF 0 " TOTAL_0
PRINT "COUNT OF 1 " TOTAL_1
...
<many lines snipped>
...
PRINT "COUNT OF 999 " TOTAL_999
So, I really don't like to see LOC, or any other counting methids
to specify the real complexity of a program. A clever ptogrammer
would use a more complex method (IMHO) and do the same thing
using arrays, and have a program using a small percentage of the
code.
I'm guessing this guy got paid by lines of code.
------------------------------
Date: 11 Apr 1997 14:05:00 GMT
From: heller@nacs.net (Jettero Heller)
Subject: Re: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <5ilgec$ben@tracy.nacs.net>
Justin Hickey (jhickey@hpcc.nectec.or.th) wrote:
: Tim Behrendsen wrote:
: >
: > But I don't even need to go there. Name one freely available
: > *significant* product that is *clearly* better than *any* commercial
: > product, regardless of price. There are some good programs of limited
: > size that are not worth a commercial entity rewriting (some may
: > say Emacs, but I wouldn't...), but I mean products of significant
: > size and complexity.
:
: How about X Windows? It has been accepted by all UNIX vendors as their
: windowing system (nothing else has challenged it that I know of ie I'm
: talking strictly UNIX here), and I may be wrong and feel free to correct
: me, but I do believe that it is free software. And it certainly is
: significant in size and complexity IMHO.
And now to prove that it is better than it's "commercial" counter
part (ie. all other GUIs). I know of one program that tries to
emulate the look of the Win95 GUI on X windows, and of at least a
half a dozen X servers that run on 95/NT (I'm not sure about MacOS,
but I bet there's a number of them out there).
QED
** Heller
--
"...endowed by their Creator with certain unalienable Rights...Life, Liberty
and the pursuit of Happiness...That whenever ANY Form of Government becomes
destructive of these ends, it is the Right of the People to alter or to
abolish it, and to institute new Government...most likely to effect their
Safety and Happiness. "
-- Declaration of Independance and a reminder to Congress
------------------------------
Date: 11 Apr 1997 12:22:47 -0500
From: buhr@stat.wisc.edu (Kevin Buhr)
Subject: Re: Why are no elements returned from split(/X/,'')?
Message-Id: <vbaybap79tw.fsf@mozart.stat.wisc.edu>
kgor@inetspace.com (Kent S. Gordon) writes:
>
> Why are no elements returned from split(/X/,'')?
Because the statement in the Camel book doesn't apply to this special
case. A split of an empty string always results in a 0-element list
(regardless of the value of the LIMIT argument).
It's just the way "split" is implemented. After it's found the last
occurrence of the delimiter (or if it couldn't find the delimiter
anywhere in the string), it includes the remainder of the string as a
field if (i) the remainder is non-empty; or (ii) the delimiter was
found at least once. Also, remember that empty-string fields will be
chopped off the end if you don't specify a non-zero LIMIT.
To recap,
split(/X/,"X")
returns a 0-element list because a missing LIMIT is taken to be 0, so
trailing empty-string fields are dropped. On the other hand,
split(/X/,"X",-1)
returns a 2-element list of empty strings, since rule (ii) above
applies. Sadly,
split(/X/,"",-1)
returns a 0-element list because the delimiter wasn't found at least
once, so neither rule (i) nor rule (ii) apply. It's just the way
things are. If you don't like it, something like:
@foo = split(/X/,$string."X",-1);
pop @foo;
might work for you.
Kevin <buhr@stat.wisc.edu>
------------------------------
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 281
*************************************