[23727] in Perl-Users-Digest
Perl-Users Digest, Issue: 5933 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 12 18:05:43 2003
Date: Fri, 12 Dec 2003 15:05:10 -0800 (PST)
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, 12 Dec 2003 Volume: 10 Number: 5933
Today's topics:
(hash|2-dim array) question <chatasos@yahoo.com>
Re: (hash|2-dim array) question (Tad McClellan)
Re: (hash|2-dim array) question <chatasos@yahoo.com>
Re: (hash|2-dim array) question <noreply@gunnar.cc>
Re: (hash|2-dim array) question <chatasos@yahoo.com>
A way to grab string from another program in perl? <jeffrey@cunningham.net>
Re: A way to grab string from another program in perl? (Malcolm Dew-Jones)
Re: A way to grab string from another program in perl? <matthew.garrish@sympatico.ca>
Re: A way to grab string from another program in perl? <abigail@abigail.nl>
Re: A way to grab string from another program in perl? <jeffrey@cunningham.net>
Re: Calling Another Script <abigail@abigail.nl>
Comparison Value (ThERiZla)
Re: Comparison Value <noreply@gunnar.cc>
Re: Forking a daemonic Socket listener from a CGI scrip (Randal L. Schwartz)
Re: Forking a daemonic Socket listener from a CGI scrip <jgibson@mail.arc.nasa.gov>
Re: How to map URL to %xx? (Randal L. Schwartz)
how to read data from EXCEL <carlo.runner@libero.it>
Re: how to read data from EXCEL <noreply@gunnar.cc>
Re: how to read data from EXCEL <trammell+usenet@hypersloth.invalid>
Re: LWP install MacOS X <henryn@zzzspacebbs.com>
Re: LWP install MacOS X <spamfilter@dot-app.org>
Re: LWP install MacOS X <henryn@zzzspacebbs.com>
Re: Memory: measuring 5 limitations (Bart Van der Donck)
Re: Need programmers? At Colance they compete for your <mbroida@fake.domain>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 12 Dec 2003 22:02:41 +0200
From: Tassos <chatasos@yahoo.com>
Subject: (hash|2-dim array) question
Message-Id: <1071259472.706097@athprx02>
I'm using a file like the following (";" is the seperator):
I1;[test1];([\w\-\.:/]+)
I2;[test2];(\w\d [\d\/]+)
I want while reading the file to create something (a hash? a 2-dim array?) that will
enable me to get the following results:
my $temp;
$temp = "I1";
print array2($temp,1) # gives "[test1]" as the output
print array2($temp,2) # gives "([\w\-\.:/]+)" as the output
$temp = "I2";
print array2($temp,1) # gives "[test2]" as the output
print array2($temp,2) # gives "(\w\d [\d\/]+)" as the output
The above example is just how i would like to do it. Of course, since perl has it's own
way, i would like someone to show me how i can do it as easily as possible.
PS: I have never used hashes before ;-)
------------------------------
Date: Fri, 12 Dec 2003 14:22:32 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: (hash|2-dim array) question
Message-Id: <slrnbtk8s8.373.tadmc@magna.augustmail.com>
Tassos <chatasos@yahoo.com> wrote:
> I want while reading the file to create something (a hash? a 2-dim array?)
A Hash Of Lists (HoL) would be convenient.
perldoc perlreftut
perldoc perlref
perldoc perllol
perldoc perldsc
> that will
> enable me to get the following results:
>
> my $temp;
>
> $temp = "I1";
> print array2($temp,1) # gives "[test1]" as the output
> print array2($temp,2) # gives "([\w\-\.:/]+)" as the output
---------------------------------------------------
#!/usr/bin/perl
use strict;
use warnings;
my %array2;
while ( <DATA> ) {
chomp;
my @fields = split /;/;
$array2{$fields[0]} = \@fields;
}
my $key = 'I1';
print $array2{$key}[1], "\n";
print $array2{$key}[2], "\n";
__DATA__
I1;[test1];([\w\-\.:/]+)
I2;[test2];(\w\d [\d\/]+)
---------------------------------------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 12 Dec 2003 23:26:09 +0200
From: Tassos <chatasos@yahoo.com>
Subject: Re: (hash|2-dim array) question
Message-Id: <1071264482.573771@athprx02>
Tad McClellan wrote:
> Tassos <chatasos@yahoo.com> wrote:
>
>
>>I want while reading the file to create something (a hash? a 2-dim array?)
>
>
>
> A Hash Of Lists (HoL) would be convenient.
>
> perldoc perlreftut
> perldoc perlref
> perldoc perllol
> perldoc perldsc
>
>
>
>>that will
>>enable me to get the following results:
>>
>>my $temp;
>>
>>$temp = "I1";
>>print array2($temp,1) # gives "[test1]" as the output
>>print array2($temp,2) # gives "([\w\-\.:/]+)" as the output
>
>
>
> ---------------------------------------------------
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my %array2;
> while ( <DATA> ) {
> chomp;
> my @fields = split /;/;
> $array2{$fields[0]} = \@fields;
> }
>
> my $key = 'I1';
> print $array2{$key}[1], "\n";
> print $array2{$key}[2], "\n";
>
> __DATA__
> I1;[test1];([\w\-\.:/]+)
> I2;[test2];(\w\d [\d\/]+)
> ---------------------------------------------------
>
thx, that seems to work fine.
But i have another problem now. How can i make each $array2{$key}[x] behave like a string
and not be interpolated?
my $Message = "blah blah [test] blah".
$Message =~ s/$array2{$key}[1]/$array2{$key}[2]/;
In order to make the above work, i need to have "[test1]" translated as "\[test1\]". Is
there a way i can avoid this?
>
------------------------------
Date: Fri, 12 Dec 2003 23:03:49 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: (hash|2-dim array) question
Message-Id: <brddvr$26jbu$1@ID-184292.news.uni-berlin.de>
Tassos wrote:
> How can i make each $array2{$key}[x] behave like a string and not
> be interpolated?
>
> my $Message = "blah blah [test] blah".
>
> $Message =~ s/$array2{$key}[1]/$array2{$key}[2]/;
>
> In order to make the above work, i need to have "[test1]"
> translated as "\[test1\]". Is there a way i can avoid this?
$Message =~ s/\Q$array2{$key}[1]/$array2{$key}[2]/;
------------------^^
That makes the s/// operator treat the _pattern_ (i.e. the left side)
as a string, and _not_ a regular expression. (You may want to compare
that with the question you asked in another Usenet group.)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sat, 13 Dec 2003 00:10:47 +0200
From: Tassos <chatasos@yahoo.com>
To: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: (hash|2-dim array) question
Message-Id: <3FDA3CE7.4040803@yahoo.com>
Gunnar Hjalmarsson wrote:
>
> Tassos wrote:
>
>> How can i make each $array2{$key}[x] behave like a string and not
>> be interpolated?
>>
>> my $Message = "blah blah [test] blah".
>>
>> $Message =~ s/$array2{$key}[1]/$array2{$key}[2]/;
>>
>> In order to make the above work, i need to have "[test1]"
>> translated as "\[test1\]". Is there a way i can avoid this?
>
>
> $Message =~ s/\Q$array2{$key}[1]/$array2{$key}[2]/;
> ------------------^^
>
> That makes the s/// operator treat the _pattern_ (i.e. the left side)
> as a string, and _not_ a regular expression. (You may want to compare
> that with the question you asked in another Usenet group.)
>
Thanks a lot Gunnar for your help. Now i'm getting closer to what i want ;-)
------------------------------
Date: Fri, 12 Dec 2003 18:44:28 GMT
From: "Jeff" <jeffrey@cunningham.net>
Subject: A way to grab string from another program in perl?
Message-Id: <pan.2003.12.12.18.44.28.583322@cunningham.net>
I'm looking for a way to run another program from a system call and get
the output produced into a perl variable without going through a file
intermediary.
system('program');
produces a string on STDOUT. I want to grab this in a variable but can't
figure out how to do it. Any ideas?
-Jeff
------------------------------
Date: 12 Dec 2003 13:23:28 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: A way to grab string from another program in perl?
Message-Id: <3fda31d0@news.victoria.tc.ca>
Jeff (jeffrey@cunningham.net) wrote:
: I'm looking for a way to run another program from a system call and get
: the output produced into a perl variable without going through a file
: intermediary.
: system('program');
: produces a string on STDOUT. I want to grab this in a variable but can't
: figure out how to do it. Any ideas?
perldoc -q system
for me, about the 7th entry.
------------------------------
Date: Fri, 12 Dec 2003 16:19:28 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: A way to grab string from another program in perl?
Message-Id: <vhqCb.14953$aF2.1662683@news20.bellglobal.com>
"Jeff" <jeffrey@cunningham.net> wrote in message
news:pan.2003.12.12.18.44.28.583322@cunningham.net...
> I'm looking for a way to run another program from a system call and get
> the output produced into a perl variable without going through a file
> intermediary.
>
> system('program');
>
> produces a string on STDOUT. I want to grab this in a variable but can't
> figure out how to do it. Any ideas?
>
What part of the explanation on how to do this in the system function
description did you not understand?
http://www.perldoc.com/perl5.8.0/pod/func/system.html
Matt
------------------------------
Date: 12 Dec 2003 22:05:37 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: A way to grab string from another program in perl?
Message-Id: <slrnbtketh.les.abigail@alexandra.abigail.nl>
Jeff (jeffrey@cunningham.net) wrote on MMMDCCLV September MCMXCIII in
<URL:news:pan.2003.12.12.18.44.28.583322@cunningham.net>:
;; I'm looking for a way to run another program from a system call and get
;; the output produced into a perl variable without going through a file
;; intermediary.
;;
;; system('program');
;;
;; produces a string on STDOUT. I want to grab this in a variable but can't
;; figure out how to do it. Any ideas?
Amazingly, how to do this is documented if you look up 'system'
in the documentation.
But I guess being spoonfed is easier.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Fri, 12 Dec 2003 21:05:44 GMT
From: "Jeff" <jeffrey@cunningham.net>
Subject: Re: A way to grab string from another program in perl?
Message-Id: <pan.2003.12.12.21.05.40.681187@cunningham.net>
On Fri, 12 Dec 2003 18:44:28 +0000, Jeff wrote:
Whoops. I should have parsed down this list a little farther. I just found
the answer. Sorry about that.
-Jeff
------------------------------
Date: 12 Dec 2003 21:56:46 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Calling Another Script
Message-Id: <slrnbtkecu.les.abigail@alexandra.abigail.nl>
Matt (nospam.hciss@yahoo.com) wrote on MMMDCCLIV September MCMXCIII in
<URL:news:vthvf9f2ugci8e@corp.supernews.com>:
:: I need to have perl script call another script on a Linux box and parse its
:: output. When I call this other script it returns between 1 and 100 lines of
:: data depending on time of day. So I need to get this data that script
:: returns into my script. At the moment all I really need is a count of how
:: many lines of data actually. So how would I do that?
my $lines = `/path/to/other/script | wc -l`;
Abigail
--
sub J::FETCH{Just }$_.='print+"@{[map';sub J::TIESCALAR{bless\my$J,J}
sub A::FETCH{Another}$_.='{tie my($x),$';sub A::TIESCALAR{bless\my$A,A}
sub P::FETCH{Perl }$_.='_;$x}qw/J A P';sub P::TIESCALAR{bless\my$P,P}
sub H::FETCH{Hacker }$_.=' H/]}\n"';eval;sub H::TIESCALAR{bless\my$H,H}
------------------------------
Date: 12 Dec 2003 13:26:14 -0800
From: cool_ian10@hotmail.com (ThERiZla)
Subject: Comparison Value
Message-Id: <42f55bd6.0312121326.323c5ce6@posting.google.com>
Hi,
I want find in an array a value start by this character : "-".
This is two examples of value in my array, I want find: -c, -s .
I use a while to scan my array, but I don't know how compare my values to find
the good one.
Suggestions and/or examples anyone ?
Thanks
------------------------------
Date: Fri, 12 Dec 2003 22:42:25 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Comparison Value
Message-Id: <brdcni$279lj$1@ID-184292.news.uni-berlin.de>
ThERiZla wrote:
> I want find in an array a value start by this character : "-".
> This is two examples of value in my array, I want find: -c, -s .
> I use a while to scan my array,
Do you? How do you do that?
> but I don't know how compare my values to find the good one.
push @values, $_ if substr($_, 0, 1) eq '-';
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 12 Dec 2003 16:11:31 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Forking a daemonic Socket listener from a CGI script - browser times out
Message-Id: <00c756b693415b4551b1bfe1626b0347@news.teranews.com>
>>>>> "Clyde" == Clyde Ingram <cingram@pjocsNOSPAMORHAM.demon.co.uk> writes:
Clyde> I have tried various tricks from the books on detaching the "Socket server"
Clyde> (child) process from the "CGI program" (parent) process, but cannot fix this
Clyde> "daemonic" problem in document loading.
Read the stuff I've repeated in at least three or four of my
columns (of the 198 I've done so far). Google for:
site:stonehenge.com cgi fork
That should point you in the right direction.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 12 Dec 2003 09:47:03 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Forking a daemonic Socket listener from a CGI script - browser times out
Message-Id: <121220030947038899%jgibson@mail.arc.nasa.gov>
In article <brcgpn$npf$1$8300dec7@news.demon.co.uk>, Clyde Ingram
<cingram@pjocsNOSPAMORHAM.demon.co.uk> wrote:
> I have 2 separate Perl programs:
>
> 1. Socket server - which listens for a connection request from a socket
> client, writes some data records, and exits.
>
> 2. CGI program - which sends a Java applet to the browser (Navigator 4.6).
> The applet requests a socket connection to the "Socket server", reads
> records, and displays them.
>
[more explanation, server log, and parts of program snipped]
>
> sub listen_and_write_to_socket {
>
> local $SIG{'PIPE'} = 'IGNORE';
>
> warn "$identity: Creating and listening on socket for "
> . +PROTOCOL . " port "
> . +SERVER_PORT . "\n";
>
> my $server_socket = IO::Socket::INET->new(
> LocalHost => +HOSTNAME,
> LocalPort => +SERVER_PORT,
> Proto => +PROTOCOL,
> Listen => SOMAXCONN,
> Reuse => 1,
> Type => SOCK_STREAM,
> )
> or die "$identity: Couldn't be a "
> . +PROTOCOL
> . " server on port "
> . +SERVER_PORT
> . ": $@\n";
>
> warn("$identity: shutting down read stream of socket - unwanted\n");
> shutdown( $server_socket, 0 ); # 0=reading, 1=writing, 2=both
> shutdown
>
> my $client;
>
> warn "$identity: Wait for incoming socket client connection request\n";
>
> $client = $server_socket->accept();
>
> # $client is the new connection
>
[ rest of program snipped]
I would suggest NOT calling shutdown on the server socket before even
calling accept to wait for client connection. Why are you doing this?
------------------------------
Date: Fri, 12 Dec 2003 16:11:30 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: How to map URL to %xx?
Message-Id: <61e2c00076afa166ba7547143a7cde9d@news.teranews.com>
>>>>> "Liberal" == Liberal <test@test.com> writes:
Liberal> I need to map things like http:// to the %xx code. Change none
Liberal> digital/letter to % then the ASCII value in 16.
Well, you don't need to change http://, but perhaps some of the
things that form a URI later. See the URI module for all the options.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 12 Dec 2003 19:06:25 GMT
From: "Carlo Cazzaniga" <carlo.runner@libero.it>
Subject: how to read data from EXCEL
Message-Id: <RkoCb.181438$vO5.7166804@twister1.libero.it>
I need to read data from EXCEL worksheets in this way:
The script perl asks me to write a number .
I type a Number f.e. 1000 , the script should look for the number 1000
inside a
excel worksheet file and if it find it, should capture all the other
numbers reported in the raw where there is the number 1000.
the mother number (1000) is always in the first colomn of excel sheet.
col1 col2 col3 col4 col5
raw1 900 002 004 006
raw2 1000 345 445 888 777
once the script had found the wanted number (1000) in the raw2 col1 ,
it gives me the other 4 number (345 445 888 777).
and put them in an array.
the cells with number in the excel workspread are variable from 0 to ...,
the script should be able to read all the cells of the raw till the first
empty cell.
there is someone could help me
Thanks Carlo
------------------------------
Date: Fri, 12 Dec 2003 21:37:04 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: how to read data from EXCEL
Message-Id: <brd8sl$26s3e$1@ID-184292.news.uni-berlin.de>
Carlo Cazzaniga wrote:
> I need to read data from EXCEL worksheets...
Use the CPAN module Spreadsheet::ParseExcel::Simple.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 12 Dec 2003 20:47:53 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: how to read data from EXCEL
Message-Id: <slrnbtkabp.gv1.trammell+usenet@hypersloth.el-swifto.com.invalid>
On Fri, 12 Dec 2003 19:06:25 GMT, Carlo Cazzaniga
<carlo.runner@libero.it> wrote:
> I need to read data from EXCEL worksheets in this way:
> The script perl asks me to write a number .
> I type a Number f.e. 1000 , the script should look for the number 1000
> inside a
> excel worksheet file and if it find it, should capture all the other
> numbers reported in the raw where there is the number 1000.
> the mother number (1000) is always in the first colomn of excel sheet.
>
> col1 col2 col3 col4 col5
> raw1 900 002 004 006
> raw2 1000 345 445 888 777
>
> once the script had found the wanted number (1000) in the raw2 col1 ,
> it gives me the other 4 number (345 445 888 777).
> and put them in an array.
> the cells with number in the excel workspread are variable from 0 to ...,
> the script should be able to read all the cells of the raw till the first
> empty cell.
Sounds like you need the Spreadsheet::ParseExcel module.
------------------------------
Date: Fri, 12 Dec 2003 18:11:52 GMT
From: Henry <henryn@zzzspacebbs.com>
Subject: Re: LWP install MacOS X
Message-Id: <BBFF44E4.19380%henryn@zzzspacebbs.com>
Sherm:
Thanks for your response on this thread:
in article OqdCb.4$xH2.8717@news1.news.adelphia.net, Sherm Pendley at
spamfilter@dot-app.org wrote on 12/11/03 10:41 PM:
> Henry wrote:
>
>> $%*$%!@@$!$, the console has scrolled so far
>> that's all fallen off the end.
>
> That reminds me of another tip - I always go into Terminal.app's
> preferences, and set the scrollback buffer to "unlimited." As you said,
> the output from the build/install process can be verbose, and if it
> fails you'll want to be able to review it from the beginning.
Ummm, that's not really a great solution. "Unlimited" also means
potentially "unlimited" stuff to review and decode. That's _too_ much.
There has to be a middle ground, a better solution than the "hyper-verbose"
output that results.
I appreciate your help. I apologize for my irritability on this issue -- I
don't mean it personally -- it's just a sign of a person who wants to get a
job done and finds himself getting deeper and deeper in irrelevant details.
My workaround solution to avoid LWP and drop into the shell to use "wget" is
looking better and better. I just hope I haven't whacked my perl
installation altogether.
>
>> Right. I speak GCC, at least in other environments, so there's no
>> fundamental issue here. But I'm really surprised that I need to load the
>> better part of 1 GB of stuff to make a couple of standard(!) modules. Is
>> there no way to distribute these as binaries?
>
> Fink has some pre-rolled modules packages, but I think they're all for
> modules that have a binary component. IIRC, they don't have an LWP package.
Right.
>
> Distributing binaries is also complicated by the fact that Panther ships
> with Perl 5.8.1 - which is not binary-compatible with 5.6. Modules that
> include compiled C code, which were compiled for 5.6 don't work with
> 5.8, and vice-versa. Anyone who creates binary packages has to create
> them for both versions - and deal with the inevitable support issues
> arising from users who install the wrong one
Yeah. I've seen all sorts of solutions for this issue, none of them
entirely satisfactory.
>
>> I'm also surprised this entire issue isn't better documented. Maybe I
>> missed something, but I did give it a good try -- several hours of hard
>> searching-- and came up mostly empty.
>
> A lot of the relevant discussion takes place on the macosx@perl.org
> mailing list - you can (un)subscribe and/or search the archives at
> <http://lists.perl.org>.
OK, looks good. Be better if there was a FAQ.
>
>> It should be clearer, in the general case of how modules are maintained and
>> ported, and I'm surprised there's not more specific information for MacOS
>> X. Or have I missed a great treasure-trove of docs?
>
> One obstacle is that there isn't really a general case that applies to
> all modules. The issue with HEAD vs. head, for example, only applies to
> LWP - I don't know of any other module that attempts to install a file
> where the file name is different from that of a system file only in
> capitalization. And, the "don't install Bundle::CPAN" bug is not only
> unique to CPAN.pm, but to a specific version of that module.
I guess there's no formal mechanism for collecting and disseminating such
advice. Release notes for each module might mention such? I've seen such
in other environments.
Anyway, I fired up the CPAN shell this morning, having loaded the developer
tools yesterday. I foolishly took its suggestion to update and restart CPAN
itself. I killed the job when I found it downloading what-was-it 11 MB to
upgrade to perl-5.8.2. I did NOT ask for that -- there's no telling what
kind of ramifications will result.
It might be easier at this point to install Panther, except that I believe
I've seen mention that it shipped with an earlier version of perl then some
might find acceptable.
Using wget is sure looking attractive ...
Thanks,
Henry
henryn@zzzspacebbs.com remove 'zzz'
>
> sherm--
------------------------------
Date: Fri, 12 Dec 2003 21:41:23 GMT
From: Sherm Pendley <spamfilter@dot-app.org>
Subject: Re: LWP install MacOS X
Message-Id: <7CqCb.315$xH2.221716@news1.news.adelphia.net>
Henry wrote:
>>That reminds me of another tip - I always go into Terminal.app's
>>preferences, and set the scrollback buffer to "unlimited."
> Ummm, that's not really a great solution. "Unlimited" also means
> potentially "unlimited" stuff to review and decode. That's _too_ much.
> There has to be a middle ground, a better solution than the "hyper-verbose"
> output that results.
We seem to have shifted subjects. I wasn't referring to reducing the
amount of output - to my knowledge, there isn't a "quiet" option.
That said, you have to choose how to deal with the output: You can save
it in case you need to review it, or throw it away and hope for the
best. I don't like leaving things to chance, so I prefer to do the
first, and my advice to adjust Terminal.app's scrollback buffer
reflected that.
> Anyway, I fired up the CPAN shell this morning, having loaded the developer
> tools yesterday. I foolishly took its suggestion to update and restart CPAN
> itself.
To put it bluntly, documentation and/or advice doesn't help if you
ignore it. Yesterday, I gave you very specific advice to first upgrade
the CPAN module by itself with "install CPAN", and *then* install
Bundle::CPAN. I clearly explained what would be the result of installing
the bundle first.
> It might be easier at this point to install Panther, except that I believe
> I've seen mention that it shipped with an earlier version of perl then some
> might find acceptable.
Panther doesn't come with LWP pre-installed either, and it's no
different installing it there than on Jaguar.
I think the best advice I can give you right now is to step back and
leave it be for a day or two. Take the weekend off. It sounds like
you're getting frustrated and impatient, and you're letting that drive
you into making mistakes - as with the CPAN bundle above.
If you approach this calmly and clearly, you'll find it's much easier
than you're making it out to be. Upgrade the CPAN module by itself with
"install CPAN" before installing the CPAN bundle with "install
Bundle::CPAN". The latest LWP version takes case-insensitive filesystems
into account, and will ask you before installing /usr/bin/HEAD. When it
asks about that, simply tell it not to.
sherm--
------------------------------
Date: Fri, 12 Dec 2003 22:48:25 GMT
From: Henry <henryn@zzzspacebbs.com>
Subject: Re: LWP install MacOS X
Message-Id: <BBFF85B6.193CD%henryn@zzzspacebbs.com>
Sherm:
Thanks for your response on this thread:
in article 7CqCb.315$xH2.221716@news1.news.adelphia.net, Sherm Pendley at
spamfilter@dot-app.org wrote on 12/12/03 1:41 PM:
> Henry wrote:
>
>>> That reminds me of another tip - I always go into Terminal.app's
>>> preferences, and set the scrollback buffer to "unlimited."
>
>> Ummm, that's not really a great solution. "Unlimited" also means
>> potentially "unlimited" stuff to review and decode. That's _too_ much.
>> There has to be a middle ground, a better solution than the "hyper-verbose"
>> output that results.
>
> We seem to have shifted subjects. I wasn't referring to reducing the
> amount of output - to my knowledge, there isn't a "quiet" option.
It was not my intention to shift subjects. A "moderately verbose" option
would be good, it doesn't exist , 'nuff said.
> That said, you have to choose how to deal with the output: You can save
> it in case you need to review it, or throw it away and hope for the
> best. I don't like leaving things to chance, so I prefer to do the
> first, and my advice to adjust Terminal.app's scrollback buffer
> reflected that.
>
>> Anyway, I fired up the CPAN shell this morning, having loaded the developer
>> tools yesterday. I foolishly took its suggestion to update and restart CPAN
>> itself.
>
> To put it bluntly, documentation and/or advice doesn't help if you
> ignore it. Yesterday, I gave you very specific advice to first upgrade
> the CPAN module by itself with "install CPAN", and *then* install
> Bundle::CPAN. I clearly explained what would be the result of installing
> the bundle first.
Ooooh, sorry...
Please help me understand: Are you suggesting that the only reason the CPAN
shell started downloading a newer version of perl is that I mulishly failed
to follow your advice? (I found a post somewhere that seems to say that
there's a bug in an older version of the shell that causes it to do this.)
I had your your post open on the desktop as I worked. I _thought_ I was
doing what you said. I still think I did: I'm pretty sure the CPAN shell
said something to the effect that I should upgrade it during the current
session, by typing (IIRC) "install CPAN". That seemed consistent with what
you advised.
I have no idea what "Bundle::CPAN" is, except that a very helpful perl guru
told me to avoid loading it first. (What's a "bundle", anyway?) I'm pretty
sure I did not either type anything containing "bundle" to the CPAN shell,
nor did I say "y" to any prompt that included that term, though something
like that might have snuck by.
A great deal of the issue is terminology. What's "CPAN"? It's "...a large
collection of Perl software and documentation", according to the
www.cpan.org FAQ. OK, no problem, makes sense.
The same term, I find, _also_ applies to a perl program that implements a
shell that helps get and install stuff from that large collection. I hadn't
a clue that definition #2 existed before yesterday or the day before. It
simply hadn't come up -- this isn't exactly publicized, at least in the
places I've looked. I've got over 50 perl reference sites bookmarked.
>
>> It might be easier at this point to install Panther, except that I believe
>> I've seen mention that it shipped with an earlier version of perl then some
>> might find acceptable.
>
> Panther doesn't come with LWP pre-installed either, and it's no
> different installing it there than on Jaguar.
OK, good, that helps me decide.
>
> I think the best advice I can give you right now is to step back and
> leave it be for a day or two. Take the weekend off. It sounds like
> you're getting frustrated and impatient, and you're letting that drive
> you into making mistakes - as with the CPAN bundle above.
Right, always a good idea. I think I'll install my unix shell wget hack in
the meantime.
>
> If you approach this calmly and clearly, you'll find it's much easier
> than you're making it out to be. Upgrade the CPAN module by itself with
> "install CPAN" before installing the CPAN bundle with "install
> Bundle::CPAN". The latest LWP version takes case-insensitive filesystems
> into account, and will ask you before installing /usr/bin/HEAD. When it
> asks about that, simply tell it not to.
Yes, I can try.
I'm also collecting questions that would help me understand this process
more comprehensively. When it is ready, I probably should post it to the
perl/mac list you recommended.
Thanks,
Henry
henryn@zzzspacebbs.com remove 'zzz'
>
> sherm--
------------------------------
Date: 12 Dec 2003 08:32:25 -0800
From: bart@nijlen.com (Bart Van der Donck)
Subject: Re: Memory: measuring 5 limitations
Message-Id: <b5884818.0312120832.10f4cba4@posting.google.com>
Oops! What a blunder about the quotes. I thought it were only the
single quotes. Yes it seems to work now with this command:
me@myserver% time perl myscript.pl
0.113u 0.034s 0:00.17 82.3% 918+2014k 0+0io 0pf+0w
me@myserver%
I will study the docs to find out what this output exactly means.
Thanks again,
Bart
PS: I also tried:
``time "\/path\/to\/perl" -e -"[options]" '/path/to/"myscript\.pl"'´´
but that didn't work.
(joke :-))
------------------------------
Date: Fri, 12 Dec 2003 22:28:47 GMT
From: MPBroida <mbroida@fake.domain>
Subject: Re: Need programmers? At Colance they compete for your business.luw8f
Message-Id: <3FDA411F.BB1EC4A@fake.domain>
Gunnar Hjalmarsson wrote:
>
> MPBroida wrote:
> > Go to Colance.com, click on "Report Violations" (at the bottom) and
> > send a nice message to the company. Remember it might NOT be a
> > real Colance person posting this crap, so keep your message
> > generally polite. Just inform them that SOMEONE is tarnishing
> > their image by spamming the newsgroups.
>
> Suppose you did just that. How on earth would if make a difference if
> a lot of other people did as well?
Well, it doesn't have to be a LOT of other people.
But if it's only ONE, they might just figure I'm a
nut and ignore it. <grin>
If they get a dozen or so, maybe they'll look into
it.
Mike
------------------------------
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 5933
***************************************