[22689] in Perl-Users-Digest
Perl-Users Digest, Issue: 4910 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 29 14:07:50 2003
Date: Tue, 29 Apr 2003 11:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 29 Apr 2003 Volume: 10 Number: 4910
Today's topics:
AAC audio module <minter@lunenburg.org>
Re: Comparing strings with small differences (Helgi Briem)
Re: Comparing strings with small differences <bart.lateur@pandora.be>
Convert hex to dec <kderaedt@hotmail.com>
Re: Convert hex to dec <tony_curtis32@yahoo.com>
Data::Dumper::SortKeys (not working for 2nd level sort <TruthXayer@yahoo.com>
Re: DBD-Pg issue <willis3_1_4_0_@yahoo.com>
Re: Difference Flat Text & DBM Database (Tad McClellan)
Re: Difference Flat Text & DBM Database <uri@stemsystems.com>
Re: errors passing values to sub from other sub with "u <noreply@gunnar.cc>
Re: errors passing values to sub from other sub with "u <nobody@dev.null>
Re: errors passing values to sub from other sub with "u (Tad McClellan)
Re: Extracting Word from Variable <jurgenex@hotmail.com>
file search logic <psmahesh@miel.mot.com>
Re: file search logic (Helgi Briem)
Re: How can I hide a specific Window (Thomas B)
Net::FTP <rrunner@san.rr.com>
Re: Newb Question: Telling perl when to stop and go wh <g4rry_short@zw4llet.com>
Re: perl, grep and multidimensional array - help needed (Anno Siegel)
problems finding an RPM - what is PLD? <mark.seger@hp.com>
Re: problems finding an RPM - what is PLD? (Sam Holden)
Re: problems finding an RPM - what is PLD? <goedicke@goedsole.com>
Re: problems finding an RPM - what is PLD? <mark.seger@hp.com>
Re: problems finding an RPM - what is PLD? <goedicke@goedsole.com>
Re: problems finding an RPM - what is PLD? <goedicke@goedsole.com>
Re: problems finding an RPM - what is PLD? <mark.seger@hp.com>
Re: regex for word whitespace word <willis3140@yahoo.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 29 Apr 2003 15:06:10 GMT
From: "H. Wade Minter" <minter@lunenburg.org>
Subject: AAC audio module
Message-Id: <Cxwra.21320$pr.5252431@twister.southeast.rr.com>
With Apple's new music service, is there any perl module that can parse
AAC/MP4 files for things like length, tags, etc.?
I searched on CPAN but didn't see anything promising.
--Wade
------------------------------
Date: Tue, 29 Apr 2003 11:09:58 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Comparing strings with small differences
Message-Id: <3eae5d71.1628231753@news.cis.dfn.de>
On Mon, 28 Apr 2003 15:06:47 -0500, mlm <mlm@nospam.com>
wrote:
>I have a long list of strings in an array. Each string differs from the
>previous by only a few characters somewhere in the string. I want to
>obtain an index (and substring length) into the string where the
>difference occurs.
>
>Eg:
>$a[0] is "Polka dot (18), sheet 07."
>$a[1] is "Polka dot (19), sheet 07."
>$a[2] is "Polka dot (20), sheet 07."
>
>if I compare $a[1] and $a[2] i would like the function to return 12,1
>(meaning the different part begins at offset 12 and is one character
>long)
>
>If I compare $ a[2] and $a[3] i want it to return 11,2.
>
>Is there a quick and dirty way to do this, rather than making a function
>to proceed character by character through the string (I can figure out
>the brute force method, but with tens of thousands of strings it might
>get slow)?
>
>Could I use foreach and a regexp to catch the different part (say if it
>was always enclosed in parentheses)?
Look into the String::Approx module which appears
to do all that you want and more.
--
Regards, Helgi Briem
helgi DOT briem AT decode DOT is
------------------------------
Date: Tue, 29 Apr 2003 14:19:38 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Comparing strings with small differences
Message-Id: <2b2tavklrp3ifair4krghljivnkp52q6uq@4ax.com>
mlm wrote:
>I have a long list of strings in an array. Each string differs from the
>previous by only a few characters somewhere in the string. I want to
>obtain an index (and substring length) into the string where the
>difference occurs.
>
>Eg:
>$a[0] is "Polka dot (18), sheet 07."
>$a[1] is "Polka dot (19), sheet 07."
>$a[2] is "Polka dot (20), sheet 07."
>
>if I compare $a[1] and $a[2] i would like the function to return 12,1
>(meaning the different part begins at offset 12 and is one character
>long)
I would think you should be able to cooks something up with
Algorithm::Diff, a Perl module implementing the "diff" command line
utility functionality. "diff" is traditionally line oriented... but that
should be easy to overcome. The module is array oriented, anyway.
<http://search.cpan.org/author/NEDKONZ/Algorithm-Diff-1.15/>
--
Bart.
------------------------------
Date: Tue, 29 Apr 2003 16:57:46 +0200
From: "kderaedt" <kderaedt@hotmail.com>
Subject: Convert hex to dec
Message-Id: <3eae92ec$0$32463$ba620e4c@reader0.news.skynet.be>
Hi,
How can I convert a heximal number into a decimal number, is there a
function available or do I have to calculate this.
Regards
Karel
------------------------------
Date: Tue, 29 Apr 2003 10:03:26 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Convert hex to dec
Message-Id: <87k7ddqrb5.fsf@limey.hpcc.uh.edu>
>> On Tue, 29 Apr 2003 16:57:46 +0200,
>> "kderaedt" <kderaedt@hotmail.com> said:
> Hi, How can I convert a heximal number into a decimal
(hexadecimal)
> number, is there a function available or do I have to
> calculate this.
s/number/numeral/g
"perldoc -f hex"
hth
t
------------------------------
Date: Tue, 29 Apr 2003 10:09:05 -0700
From: TruthXayer <TruthXayer@yahoo.com>
To: TruthXayer <TruthXayer@yahoo.com>
Subject: Data::Dumper::SortKeys (not working for 2nd level sort)
Message-Id: <3EAEB1B1.A56E9F24@yahoo.com>
This worked for the simple testcase(sor by value,key) on
first level hash. But on expansion it fails to sort by
second level
value.
#!/perl -w
use strict;
use Data::Dumper;
$Data::Dumper::Sortkeys = \&my_filter2;
my %hash = (
"A" => {
ratio => 34
},
"B" => {
ratio => 75
},
"C" => {
ratio => 21
},
);
print Dumper ( \%hash );
sub my_filter2 {
my ($hash) = shift;
# return an array ref containing the hash keys
to dump
# in the order that you want them to be dumped
return [ sort { $hash->{$b}->{ratio} <=>
$hash->{$a}->{ratio} } (keys %$hash) ];
}
------------------------------
Date: Tue, 29 Apr 2003 16:21:09 GMT
From: w i l l <willis3_1_4_0_@yahoo.com>
Subject: Re: DBD-Pg issue
Message-Id: <8h9tavk1jrvbe2r5pbrfarapf4jqacgkq8@4ax.com>
Could it be that apache doesn't have permission to that, and you do?
- w i l l
On 28 Apr 2003 19:54:02 -0700, as400tips@lycos.com (IKNIR) wrote:
>am struggling with the DBD-Pg installation almost 3 weeks. Please
>somebody out there could help me. Thank you in advance.
>
>I have installed the following on WINDOWS XP:
>CYGWIN
>POSTGRESQL 7.3.1
>APACHE 2.0.43
>ACTIVESTATE PERL 5.8
>DBI 1.35 (Installed using cygwin)
>DBD-Pg 1.22 (Installed using cygwin perl makefile.pl, make, make test,
>and make install)
>
>I have no problem in running the following script in CYGWIN:
>
>#!/perl/bin/perl -w
>BEGIN {
> push(@INC, 'C:/cygwin/lib/perl5/site_perl/5.6.1/cygwin-multi');
>}
>use DBI;
>use DBD::Pg;
>print "Content-type: text/html\n\n";
>print "hi";
>
>However, I cannot run this using the browser. I get the following
>error.
>
>Can't load 'C:/cygwin/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBD/Pg/Pg.dll'
>for module DBD::Pg:load_file:The specified module could not be found
>at C:/Perl/lib/DynaLoader.pm line 229.
>
>What am I doing wrong? Why this works in CYGWIN but not in browser?
------------------------------
Date: Tue, 29 Apr 2003 06:51:37 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Difference Flat Text & DBM Database
Message-Id: <slrnbaspq9.l6v.tadmc@magna.augustmail.com>
Michael Budash <mbudash@sonic.net> wrote:
> In article <46cdc619.0304282034.6dee1eb4@posting.google.com>,
> csdude@hotmail.com (Mike) wrote:
>> I recently started playing around with DBM databases, but I'm not
>> really seeing what the difference is between this is a flat-text
>> database. Can somebody enlighten me?
>> Is there an advantage to the DBM database that I'm not seeing?
> random access, for one.
Persistence for another.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 29 Apr 2003 14:23:33 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Difference Flat Text & DBM Database
Message-Id: <x7r87l5qmy.fsf@mail.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@augustmail.com> writes:
>>> I recently started playing around with DBM databases, but I'm not
>>> really seeing what the difference is between this is a flat-text
>>> database. Can somebody enlighten me?
>>> Is there an advantage to the DBM database that I'm not seeing?
TM> Persistence for another.
hmm, my flat files usually last from execution to execution. and i wrote
a small single flat file DB system a few years ago (under cgi with
locks).
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Tue, 29 Apr 2003 12:55:37 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: errors passing values to sub from other sub with "use strict"
Message-Id: <b8llkv$b8d5c$1@ID-184292.news.dfncis.de>
Tony wrote:
> During the course of some perl programming I have come accross
> a specific problem that has got me stumped.
>
> I have a small program (Simplified) with 2 sub's:
<snip>
> foreach $item(@LIST);
------------------^^^^^
Where did that variable come from?
Arguments passed to a subroutine can be found in the array @_ .
> This works when switching off "use strict" but with "use strict"
> all saundry errors like
What you say "works" is calling _global_ variables from within a
subroutine. You seem not to know how to grab arguments passed to a
subroutine.
> What am I doing wrong - reading "Learning perl" and the Camel book
> 3rd ed. does not shed any light over it.
Sounds odd. Try to read a little more. Or try
http://www.perldoc.com/perl5.8.0/pod/perlsub.html
/ Gunnar
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Tue, 29 Apr 2003 11:49:13 GMT
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: errors passing values to sub from other sub with "use strict"
Message-Id: <3EAE667F.8070200@dev.null>
Tony wrote:
>
> Sorry, small typo
>
> On Tue, 29 Apr 2003 19:36:13 +1000, Tony wrote:
>
>
>
>>#!/usr/bin/perl
>>use warnings;
>>use strict;
>>
>>@list("something 1", "something_else 1");
>>
>>
>>@process_list(@list)
>>
> ^^^^^^^^^^^^^^^^^^^^^^^
> should be
>
> process_list(@list)
>
>
>>sub process_list
>>
> rest snipped...
Now no one article has a complete version of your program :-(
Putting together a minimal program that exhibits your problem was a good
idea. Just make sure it checks for syntax (execute it using the -c
option, as in
perl -c try.pl
), then copy and paste (do not retype) it into your posting. That way we
can focus on helping solve your problem rather than eliminating your typos.
------------------------------
Date: Tue, 29 Apr 2003 06:39:47 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: errors passing values to sub from other sub with "use strict"
Message-Id: <slrnbasp43.l6v.tadmc@magna.augustmail.com>
Tony <anthony@movielink.net.au> wrote:
> @list("something 1", "something_else 1");
What did you expect that to do?
It is not Perl code...
(have you seen the Posting Guidelines that are posted here frequently?)
> sub process_list
> {
> foreach $item(@LIST);
> my $var1 = "text";
> my $var2 = strip trailing digit and whitespace from $item;
> my $var3 = remove all but trailing digit from $item;
>
> do_something($var1,$var2,$var3)
> }
>
>
> sub do_something
> {
> my $var_1 = "text";
> my $var_2 = "text2";
> my $var_3 = $var1;
> my $var_4 = $var2;
> my $var_5 = $var3;
>
> print "$var_1 $var_2 $var_3 $var_4 $var_5\n"
> }
>
> This should produce the content of the 5 variables as
> a combination of the 2 locally defined ones in the second sub
> and the 3 ones passed from the first sub.
No it shouldn't. It should print the 2 locally defined ones,
and the values from 3 *global* variables. You never make use
of the values that were passed as arguments.
(actually, using globals is what you appear to be _attempting_ to do,
the reason it does not "work" is because $var1 et. al. are _not_
globals, but lexicals.
)
> This works when switching off "use strict"
Because then $var1/2/3 are global (package) variables.
> It is as if creating these variables within a sub, and
> then trying to pass them to another sub, causes the problem
You are not trying to "pass" them, your subroutine ignores
its argument list.
> What am I doing wrong -
Ignoring the arg list and communicating via global variables instead.
Use the argument list rather than global variables:
my $var_3 = $_[0];
my $var_4 = $_[1];
my $var_5 = $_[2];
or
my $var_3 = shift;
my $var_4 = shift;
my $var_5 = shift;
or (preferred)
my($var_3, $var_4, $var_5) = @_;
> reading "Learning perl" and the Camel book
> 3rd ed. does not shed any light over it.
Llama book (3e) "Private Variables in Subroutines" p62.
See also:
"Coping with Scoping":
http://perl.plover.com/FAQs/Namespaces.html
> I tried to use the "my" in front of different variables
Good.
Very good.
Keep working on your code until both "use strict" and "use warnings"
are happy (silent). The effort will be repaid many times over.
> but that caused other errors about "." concatenation or
> something to that effect.
^^^^^^^^^^^^^^^^^^^^^^^^
That is not enough information.
If you want help with some message you are getting, then please
include the *exact text* of the message in your post.
(have you seen the Posting Guidelines that are posted here frequently?)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 29 Apr 2003 11:27:47 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Extracting Word from Variable
Message-Id: <Tktra.635$Tb.576@nwrddc02.gnilink.net>
Chris wrote:
> I have a variable $section that contains the string
> 'store=grocery">Grocery</a>'. How would I extract the word 'grocery'
> from the last part of this string? I assume I search for the word
> store= and extract all the characters until I reach " but don't know
> how to do this.
Others have answered your immediate question. But it appears you are trying
to parse/extract HTML.
If this is the case then be warned that REs are not the right tool to parse
HTML. You may want to use an HTML parser to parse HTML. It will make your
live and the live of others much easier.
jue
------------------------------
Date: Tue, 29 Apr 2003 21:49:35 +0530
From: P S Mahesh <psmahesh@miel.mot.com>
Subject: file search logic
Message-Id: <3EAEA617.8A6B7CFE@miel.mot.com>
Hi Folks,
I have a file which contains a certain pattern "get_clear_data" and
some lines in between them.
get_clear_data 0 0 0
-------
--
get_clear_data 0 1 0
--
I need to search in between this two occurences and find if a
string"XXX" is present and if it is present. I need to print the
previous get_clear_data pattern. I tried a couple of logics, could not
get a head start. Can anyone suggest a proper logic.
thanks,
mahesh.
------------------------------
Date: Tue, 29 Apr 2003 16:43:29 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: file search logic
Message-Id: <3eaeab81.1648218332@news.cis.dfn.de>
On Tue, 29 Apr 2003 21:49:35 +0530, P S Mahesh
<psmahesh@miel.mot.com> wrote:
>I have a file which contains a certain pattern "get_clear_data" and
>some lines in between them.
>
>get_clear_data 0 0 0
>-------
>--
>get_clear_data 0 1 0
>--
>
>I need to search in between this two occurences and find if a
>string"XXX" is present and if it is present. I need to print the
>previous get_clear_data pattern. I tried a couple of logics, could not
>get a head start. Can anyone suggest a proper logic.
my $data;
while (<DATA>)
{
if (/get_clear_data\s+(.*)/) { $data = $1; }
print "$data\n" if /XXX/;
}
--
Regards, Helgi Briem
helgi DOT briem AT decode DOT is
------------------------------
Date: 29 Apr 2003 08:16:49 -0700
From: thomas@shurflo.com (Thomas B)
Subject: Re: How can I hide a specific Window
Message-Id: <866f534e.0304290716.3cdef523@posting.google.com>
> I'm sure that you can read the docs of Win32::Process just as well as I
> can, and can figure out how to do that yourself.
I read the documentation before I posted. The problem is the
documentation is too sparse. There's nothing in there that even
remotely describes the constants listed in it.
> The next closest thing would be to start the app, then using Win32::API
> and the FindWindow and EnumWindows functions of <something>.dll, or
> whatever, find the window that was created, and close or minimize it.
Thanks for your help. I'll try that next.
------------------------------
Date: Tue, 29 Apr 2003 15:53:12 GMT
From: "Danny" <rrunner@san.rr.com>
Subject: Net::FTP
Message-Id: <Idxra.21199$Eu1.1008798@twister.socal.rr.com>
I am trying to upload files to devices that require stream mode. I am trying
to write a script to so this using the Net::FTP module. It appears the
script works but one problem. The devices don't use passive mode I believe.
How can I get the script to use stream mode?
------------------------------
Date: Tue, 29 Apr 2003 11:23:49 +0000
From: Garry Short <g4rry_short@zw4llet.com>
Subject: Re: Newb Question: Telling perl when to stop and go while reading a file..
Message-Id: <b8ljus$lbl$1$8300dec7@news.demon.co.uk>
entropy123 wrote:
> Hey all,
>
> Thank you all for your help on my input/output question, works like a
> charm.
>
> Now that I can open a file, read it, and output to the output file I
> need to figure out how to tell perl what I exactly want inside the old
> file and how I want it transferred to the new file.
>
> For example (oldfile is the old file and newfile is the new output
> file)
>
> The first 4 lines of oldfile are filler and I'll never use them (Maybe
> someday I'd use them but not right now).
>
> The juicy stuff starts on line 5 which starts out with two spaces and
> a series of numbers like:
> ssssnnnnnnnssnnnnnnssnnnnnnsscssssnsssnsssn
> s= space
> n= number
> c = character
>
> Line 5 starts a series of such lines and all I ever want is the
> character c and which line it came from.
>
> At some point, unique to each file, something new starts to happen,
> the new information starts out with 2 spaces instead of four.
>
> Sorry for all the questions (This is something I need to put together
> for my eng. related grad project...gotta graduate!)
>
> Thanks,
> entropy
I'd probably do something like :
while (<FILE>) {
if ($_ =~ /^ {4}[0-9 ]*([a-zA-Z])[0-9 ]*$/) {
print "$1\n"; # The character you're looking for
} elsif ($_ = /^ {2}/) { # This is where your input file changes
# Process however I want it to, assuming differently to above
}
}
This allows the single character to appear anywhere on the line; it also
restricts the line to numbers, spaces and a single character. If the new
information doesn't get processed any differently, you can just remove the
elsif section.
The regex, BTW, breaks down as follows, if you don't already know :
/ = marker for the start and end of the regex
^ = start of line
{4} = match four spaces
[0-9 ]* = any number or a space, any number of times
([a-zA-Z]) = match any lower or upper case character, and place it in the
next available regex variable (in this case, $1)
$ = end of line.
HTH,
Garry
------------------------------
Date: 29 Apr 2003 10:52:48 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl, grep and multidimensional array - help needed
Message-Id: <b8lli0$d4u$1@mamenchi.zrz.TU-Berlin.DE>
Rainer Scherg <Rainer.Scherg@t-online.de> wrote in comp.lang.perl.misc:
>
>
> Bernard El-Hagin schrieb:
> >
> > >
> > > for the last line I'm getting the following error message:
> > >>Modification of a read-only value attempted at "perl-progname.cgi"
> > >>line XX.
> > >
> > > The same error I get using the sort function.
> > >
> > >
> > > Any idea why?
> > > I don't see any error here. Any hint is appreciated.
> >
> > There is no error in your snippet. I copied it and ran it with no problems.
> >
>
>
> Well, I'm glad to here this.
> But unfortunatly perl 5.6.1 has a different opinion on this.
>
> Perhaps I have to post "more" code, because there are some
> if () { } else... statments part of the code.
>
> But normally these "if" should not affect the grep, shouldn't it?
Not normally. However, a forgotten ";" or ")" or similar can lead
to mis-parsing with the "Modification..." message. Look for that,
or post complete code that *demonstrates* the problem.
Anno
------------------------------
Date: Tue, 29 Apr 2003 09:46:48 -0400
From: Mark Seger <mark.seger@hp.com>
Subject: problems finding an RPM - what is PLD?
Message-Id: <3EAE8248.401287A0@hp.com>
I'm sure the answer is out there in the ether somewhere, but I sure
can't seem to find it.
All I want to do is install the Time::HiRes pm on redhat linux. I found
a number of RPMs but they all install it into a vendor specific
subdirectory named 'vendor_perl/5.8.0...'. Some rpms put it under a
subdirectory called pld and at least one put it under
"i3860-linux-thread-multi". To make matters worse, I'm not even running
5.8.0 and "vendor_perl" isn't even in my include path.
I finally got a non-rpm copy from cpan and did the usual "perl
Makefile.pl, etc" and it worked fine, but I would find it much easier
(and less threatening for people who need to install the scripts I'm
writing) to simply install the rpms.
So I guess I have several questions such as:
- is there a way to get the rpms to install where the default includes
are expected to be?
- is there an rpm that WILL put them there and if so how do I find it?
- is there a simple way to get m perl to look in vendor_perl? Doesn't
'use' get executed before the interpretter even looks at any executable
code.
-mark
------------------------------
Date: 29 Apr 2003 14:19:00 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <slrnbat2ek.kth.sholden@flexal.cs.usyd.edu.au>
On Tue, 29 Apr 2003 09:46:48 -0400, Mark Seger <mark.seger@hp.com> wrote:
>
> So I guess I have several questions such as:
> - is there a way to get the rpms to install where the default includes
> are expected to be?
Ask somewhere that cares about RPMs.
> - is there an rpm that WILL put them there and if so how do I find it?
Probably, again ask somewhere that cares about RPMs.
> - is there a simple way to get m perl to look in vendor_perl? Doesn't
> 'use' get executed before the interpretter even looks at any executable
> code.
perldoc -q 'add a directory'
perldoc -q library
--
Sam Holden
------------------------------
Date: Tue, 29 Apr 2003 14:26:41 GMT
From: William Goedicke <goedicke@goedsole.com>
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <m3znm9idlx.fsf@mail.goedsole.com>
Dear Mark -
Mark Seger <mark.seger@hp.com> writes:
> So I guess I have several questions such as:
> - is there a way to get the rpms to install where the default includes
> are expected to be?
Yes, but only if the RPM was built properly.
> - is there an rpm that WILL put them there and if so how do I find it?
I doubt it, and definitely not for every module.
> - is there a simple way to get m perl to look in vendor_perl? Doesn't
> 'use' get executed before the interpretter even looks at any executable
> code.
Yes, you change the default @INC value for perl. I don't know how,
but it's in some startup script.
May I suggest that there is another question you might like to have
answered. It goes something like, "Is there a module installation
mechanism like www.rpmfind.net? Maybe with some improvements like
automatic handling of versions and dependency downloads."
There is: try "perl -MCPAN -e shell".
Yours - Billy
============================================================
William Goedicke goedicke@goedsole.com
http://www.goedsole.com:8080
============================================================
Lest we forget:
On time, on budget; who cares!
- Tom Peters
------------------------------
Date: Tue, 29 Apr 2003 12:46:14 -0400
From: Mark Seger <mark.seger@hp.com>
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <3EAEAC56.F958179D@hp.com>
> May I suggest that there is another question you might like to have
> answered. It goes something like, "Is there a module installation
> mechanism like www.rpmfind.net? Maybe with some improvements like
> automatic handling of versions and dependency downloads."
>
> There is: try "perl -MCPAN -e shell".
sounds pretty cool, so I tired it out. Everything worked fine except when I
tried to install something with it! 8-(
the errors it gives are pretty cryptic such as: "Your
/root/.cpan/sources/modules/02packages.details.txt.gz does not contain a
Line-Count header."
closer inspection showed it was not a gz file, but rather contained an error
message returned from the web server telling me there were too many users. I
would have thougt since one gives it a list of servers it could figure out
how to fail over when one server can't serve your request. of am I
misinterpretting what that list really does?
I also couldn't figure out how to reconfigure my Config file. I tried "o
conf urllist" but it didn't give me a list to choose from as it does during a
brand new configuration) so I clobbered the file and reconfigured from
scratch, using different servers by they too generated errors, the latest one
telling me:
"Switching to Binary mode.
200 PORT command successful. Consider using PASV.
550 Failed to open file."
is this normal or am I doing something silly? misconfigured?
-mark
------------------------------
Date: Tue, 29 Apr 2003 17:07:20 GMT
From: William Goedicke <goedicke@goedsole.com>
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <m3ptn5i668.fsf@mail.goedsole.com>
Dear Mark -
Mark Seger <mark.seger@hp.com> writes:
> > There is: try "perl -MCPAN -e shell".
>
> the errors it gives are pretty cryptic such as: "Your
> /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a
> Line-Count header."
>
> is this normal or am I doing something silly? misconfigured?
I've never had problems like that. It just (well, perhaps a little
tweaking) worked. What OS are you on? Did you install all the
utilities it asked about (e.g. lynx, ncftp)?
Yours - Billy
============================================================
William Goedicke goedicke@goedsole.com
http://www.goedsole.com:8080
============================================================
Lest we forget:
Computing axiom #4
When it breaks once; ignore it. When it breaks twice; worry.
When it breaks the third time; fix it.
- William Goedicke
------------------------------
Date: Tue, 29 Apr 2003 17:08:36 GMT
From: William Goedicke <goedicke@goedsole.com>
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <m3llxti644.fsf@mail.goedsole.com>
Dear Mark -
Mark Seger <mark.seger@hp.com> writes:
> an error message returned from the web server telling me there were
> too many users.
I like using nasa and universities.
Yours - Billy
============================================================
William Goedicke goedicke@goedsole.com
http://www.goedsole.com:8080
============================================================
Lest we forget:
It's the little things
------------------------------
Date: Tue, 29 Apr 2003 13:08:02 -0400
From: Mark Seger <mark.seger@hp.com>
Subject: Re: problems finding an RPM - what is PLD?
Message-Id: <3EAEB172.EF55C298@hp.com>
> I've never had problems like that. It just (well, perhaps a little
> tweaking) worked. What OS are you on? Did you install all the
> utilities it asked about (e.g. lynx, ncftp)?
it did tell me it couldn't find lynx but it never told me it was required. I
just assumed it was one of those things where it was trying to determine my
system's capabilities and then only use those it needs. That was the only
thing it mentioned.
I'm running redhat 7.2
-mark
------------------------------
Date: Tue, 29 Apr 2003 16:44:04 GMT
From: w i l l <willis3140@yahoo.com>
Subject: Re: regex for word whitespace word
Message-Id: <6tatavkuolchmjlusgchmoisou6o1r3r6d@4ax.com>
HTML::TokeParse might help get you going in the right direction
w i l l
On Sun, 27 Apr 2003 00:46:11 GMT, "John Gros"
<johngros@bigpond.net.au> wrote:
>I have been trying to get a regex to pick up both single words and two word
>descriptions of an a href tag but it refuses to pickup two word
>descriptions. I have been going over perlre looking for ways to do this and
>have tried many variations. I often believe I have a regex that logically
>should work yet while $1 is set $2 is not. $1 being the link and $2 being
>the description, it does get set for a single word description but not set
>for two word descriptions.
>
>Regexs I have tried.
>/([A-Z]{2}.HTM)(>.*?<)/;
>
>/([A-Z]{2}.HTM)>(.*?)</;
>
>/([A-Z]{2}.HTM)>(\w*\s\w*)</;
>
>/([A-Z]{2}.HTM)>(\w*\s?\w{0,20})</;
>
>/([A-Z]{2}.HTM)>(\w*.?\w{0,20})</;
>
>/([A-Z]{2}.HTM)>(\w*.+\w+)</;
>
>/([A-Z]{2}.HTM)>(\w*.+)</;
>
>/([A-Z]{2}.HTM)>(\w*.?\w+)</;
>
>I have run out of ideas.
>
>
------------------------------
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 4910
***************************************