[31349] in Perl-Users-Digest
Perl-Users Digest, Issue: 2601 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 18 03:09:50 2009
Date: Fri, 18 Sep 2009 00:09:12 -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 Fri, 18 Sep 2009 Volume: 11 Number: 2601
Today's topics:
FAQ 6.14 How do I process each word on each line? <brian@theperlreview.com>
How to call a subroutine by a scalar? <WaterLin@ymail.invalid>
Re: How to call a subroutine by a scalar? <jurgenex@hotmail.com>
Re: How to call a subroutine by a scalar? <ben@morrow.me.uk>
Re: How to find the smallest int to a number? <kkeller-usenet@wombat.san-francisco.ca.us>
Re: How to find the smallest int to a number? <it.is.me@an.invalid>
Re: How to find the smallest int to a number? sln@netherlands.com
Re: How to find the smallest int to a number? sln@netherlands.com
Re: How to find the smallest int to a number? <it.is.me@an.invalid>
Re: matching array element to hash key <ben@morrow.me.uk>
Re: matching array element to hash key sln@netherlands.com
Re: matching array element to hash key <cartercc@gmail.com>
perl script execution take a long time <jaingaurav.08@gmail.com>
Re: perl script execution take a long time <uri@StemSystems.com>
Re: perl script execution take a long time <jurgenex@hotmail.com>
Re: perl script execution take a long time <uri@StemSystems.com>
Re: perl script execution take a long time <jurgenex@hotmail.com>
Re: perl script execution take a long time <uri@StemSystems.com>
Re: Underwear supplier (paypal payment)( www.brandtr <jurgenex@hotmail.com>
Re: Underwear supplier (paypal payment)( www.spammer <it.is.me@an.invalid>
Re: Using Perl's Bits 'n Pieces ;-) <ben@morrow.me.uk>
Re: Using Perl's Bits 'n Pieces ;-) <RF@NoDen.con>
Re: Using Perl's Bits 'n Pieces ;-) <RF@NoDen.con>
Re: Using Perl's Bits 'n Pieces ;-) <RF@NoDen.con>
Re: Using Perl's Bits 'n Pieces ;-) <ben@morrow.me.uk>
Re: Using Perl's Bits 'n Pieces ;-) <ben@morrow.me.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 18 Sep 2009 04:00:05 GMT
From: PerlFAQ Server <brian@theperlreview.com>
Subject: FAQ 6.14 How do I process each word on each line?
Message-Id: <9BDsm.205622$Qg6.90418@newsfe14.iad>
This is an excerpt from the latest version perlfaq6.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
6.14: How do I process each word on each line?
Use the split function:
while (<>) {
foreach $word ( split ) {
# do something with $word here
}
}
Note that this isn't really a word in the English sense; it's just
chunks of consecutive non-whitespace characters.
To work with only alphanumeric sequences (including underscores), you
might consider
while (<>) {
foreach $word (m/(\w+)/g) {
# do something with $word here
}
}
--------------------------------------------------------------------
The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.
------------------------------
Date: Fri, 18 Sep 2009 12:52:14 +0800
From: Water Lin <WaterLin@ymail.invalid>
Subject: How to call a subroutine by a scalar?
Message-Id: <833a6kdfcx.fsf@ymail.invalid>
I have a subroutine defined as following:
-------------
sub sub_test {
print "test";
}
Then I have a scalar whoes value is the subroutine's name, like:
-------------
my $sub_name = "sub_test";
Can I reference the sub according the scalar $sub_name? That means
whether I can call sub_test by just knowing its name.
Thanks
--
Water Lin's blog: http://blog.waterlin.org
Email: WaterLin@ymail.com
------------------------------
Date: Thu, 17 Sep 2009 22:17:08 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: How to call a subroutine by a scalar?
Message-Id: <4o56b5hbk0c1n83vlak5d17q2qum5fvm9m@4ax.com>
Water Lin <WaterLin@ymail.invalid> wrote:
>
>I have a subroutine defined as following:
>-------------
>sub sub_test {
> print "test";
>}
>
>Then I have a scalar whoes value is the subroutine's name, like:
>-------------
>my $sub_name = "sub_test";
>
>Can I reference the sub according the scalar $sub_name? That means
>whether I can call sub_test by just knowing its name.
Yes, you can using eval().
However depending upon where the value of $sub_name is coming from (user
input?) a much better and much much safer way is to use a dispatch
table.
jue
jue
------------------------------
Date: Fri, 18 Sep 2009 06:19:40 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: How to call a subroutine by a scalar?
Message-Id: <cshbo6-78n.ln1@osiris.mauzo.dyndns.org>
Quoth Water Lin <WaterLin@ymail.invalid>:
>
> I have a subroutine defined as following:
> -------------
> sub sub_test {
> print "test";
> }
>
> Then I have a scalar whoes value is the subroutine's name, like:
> -------------
> my $sub_name = "sub_test";
>
> Can I reference the sub according the scalar $sub_name? That means
> whether I can call sub_test by just knowing its name.
You can, but you need to consider whether this is a good idea. The
syntax is
$sub_name->()
or
&{$sub_name}()
but since $sub_name holds a string rather than a real ref this is a form
of symbolic reference. See perldoc -q "variable name" for a discussion
of why this is a bad idea (the FAQ entry is talking about symrefs to
variables, but much the same holds for symrefs to subs).
Generally speaking, a much better answer is to put real refs in a hash
my %dispatch = (
sub_test => sub { print "test" },
);
and then call them using the same syntax as above
$dispatch{$sub_name}->()
Ben
------------------------------
Date: Thu, 17 Sep 2009 15:13:04 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: How to find the smallest int to a number?
Message-Id: <gsoao6xg4a.ln2@goaway.wombat.san-francisco.ca.us>
On 2009-09-17, sln@netherlands.com <sln@netherlands.com> wrote:
> On Thu, 17 Sep 2009 21:30:12 +0200, "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:
>
>>On 2009-09-16 07:26, Peter Makholm <peter@makholm.net> wrote:
>>> Water Lin <WaterLin@ymail.invalid> writes:
>>>
>>>> I want to find a int which is bigger than $test, but it is also the
>>>> smallest int to $test. The result should be 5 if $test = 4.34. The
>>>> result should also be -5 if $test = -5.4.
>>>
>>> You're looking for the ceil() function. It is available from the POSIX
>>> module.
>>>
>>> use POSIX qw(ceil);
>>
>>Not quite. The ceil function returns the smallest integer greater or
>>equal than the argument. But Water wants the smallest integer greater
>>than the argument. The floor function can be used to compute that:
>
> No, ceil returns the largest integer greater or equal to the fraction.
As Wolf mentioned, that makes no sense, unless you expect to return
omega for every call to ceil().
> He mistated, but ceil is what he needs, based on his expected result:
> "The result should be 5 if $test = 4.34. The
> result should also be -5 if $test = -5.4."
How do you know he misstated? Perhaps he really needs the integer
strictly greater than $test.
What should the result be if $test == 4? Should it be 4 or 5?
If 4, then he needs floor($test).
If 5, then he needs ceil($test+1).
floor($test+1) equals ceil($test) except when $test is an integer, as
Peter's code demonstrates (though that's not a proof).
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
------------------------------
Date: Thu, 17 Sep 2009 15:38:39 -0700
From: September Storm <it.is.me@an.invalid>
Subject: Re: How to find the smallest int to a number?
Message-Id: <QTysm.434642$Ta5.334053@newsfe15.iad>
sln@netherlands.com wrote:
> No, ceil returns the largest integer greater or equal to the fraction.
You are mistaken.
> He mistated,
How do you know?
------------------------------
Date: Thu, 17 Sep 2009 17:25:42 -0700
From: sln@netherlands.com
Subject: Re: How to find the smallest int to a number?
Message-Id: <7ki5b55lq85jiirbmglgnrm76cou9f6jck@4ax.com>
On Wed, 16 Sep 2009 15:12:04 +0800, Water Lin <WaterLin@ymail.invalid> wrote:
>
>I want to find the easiest way to do such kind of thing:
>
>for a number:
>$test = 4.34
>
>I want to find a int which is bigger than $test, but it is also the
>smallest int to $test. The result should be 5 if $test = 4.34. The
>result should also be -5 if $test = -5.4.
>
>Any built in way to do this in perl?
It looks like you are describing the ceil() function.
Because ceil() completely describes exactly what you want to do,
adding .000000001 to $test only causes $result to be > $test, that would
otherwise be equal, since both ceil/floor return the argument if a whole number.
$result = ceil($test + .000000001)
-sln
------------------------------
Date: Thu, 17 Sep 2009 17:46:40 -0700
From: sln@netherlands.com
Subject: Re: How to find the smallest int to a number?
Message-Id: <h0m5b59au6aoppata6qs7b8rubka3i2h1u@4ax.com>
On Thu, 17 Sep 2009 17:25:42 -0700, sln@netherlands.com wrote:
>On Wed, 16 Sep 2009 15:12:04 +0800, Water Lin <WaterLin@ymail.invalid> wrote:
>
>>
>>I want to find the easiest way to do such kind of thing:
>>
>>for a number:
>>$test = 4.34
>>
>>I want to find a int which is bigger than $test, but it is also the
>>smallest int to $test. The result should be 5 if $test = 4.34. The
>>result should also be -5 if $test = -5.4.
>>
>>Any built in way to do this in perl?
>
>It looks like you are describing the ceil() function.
>
>Because ceil() completely describes exactly what you want to do,
>adding .000000001 to $test only causes $result to be > $test, that would
>otherwise be equal, since both ceil/floor return the argument if a whole number.
>
>$result = ceil($test + .000000001)
^^^^^^^^^^^^^^^^
print ceil(4.99999999999999 + .000000001), "\n";
So don't use this because it prints 6 when it should be 5
-sln
------------------------------
Date: Thu, 17 Sep 2009 20:55:48 -0700
From: September Storm <it.is.me@an.invalid>
Subject: Re: How to find the smallest int to a number?
Message-Id: <8xDsm.205621$Qg6.135345@newsfe14.iad>
sln@netherlands.com wrote:
> On Thu, 17 Sep 2009 17:25:42 -0700, sln@netherlands.com wrote:
>
>>On Wed, 16 Sep 2009 15:12:04 +0800, Water Lin <WaterLin@ymail.invalid>
>>wrote:
>>
>>>
>>>I want to find the easiest way to do such kind of thing:
>>>
>>>for a number:
>>>$test = 4.34
>>>
>>>I want to find a int which is bigger than $test, but it is also the
>>>smallest int to $test. The result should be 5 if $test = 4.34. The
>>>result should also be -5 if $test = -5.4.
>>>
>>>Any built in way to do this in perl?
>>
>>It looks like you are describing the ceil() function.
>>
>>Because ceil() completely describes exactly what you want to do,
>>adding .000000001 to $test only causes $result to be > $test, that
>>would otherwise be equal, since both ceil/floor return the argument if
>>a whole number.
>>
>>$result = ceil($test + .000000001)
>
> ^^^^^^^^^^^^^^^^
>
> print ceil(4.99999999999999 + .000000001), "\n";
>
> So don't use this because it prints 6 when it should be 5
>
> -sln
But now you've changed everything to get the result you wanted to
expect. What's the point to doing that?
------------------------------
Date: Thu, 17 Sep 2009 23:07:36 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: matching array element to hash key
Message-Id: <8ioao6-6vi.ln1@osiris.mauzo.dyndns.org>
Quoth ccc31807 <cartercc@gmail.com>:
<snip>
>
> I have a four level hash that looks like this:
> $hash{$s}{$l}{$h}{$id} = $terms
> This has contains about 8,000 discrete elements.
>
> The $id key in the hash either matches an array element or it does
> not. I need to write the hash keys and the values to one file if the
> $id matches the array element. I need to write the unmatching array
> elements to a second file, and the unmatching hash elements to a third
> file.
>
> Here's what I'm trying to do:
>
> foreach my $sid (@array)
> {
> if ($sid == ???)
> {
> print FIRST qq($s $l $h $id $hash{$s}{$l}{$h}{$id}\n);
> delete $hash{$s}{$l}{$h}{$id};
> shift @array;
> }
> }
> foreach (@array) { print SECOND qq{$_\n); }
>
> Then, print the remaining hash elements to THIRD
>
> I'm sorry, but for the life of me I can't figure out how to access the
> last level of the hash, at least without iterating through the hash.
You can't. Iterate over the whole structure and build a new hash keyed
by $id only (or, obviously, modify whatever code builds %hash to do that
in the first place).
Presumably all your $ids are unique? If they aren't, you will need to
decide what to do with the duplicates, but you needed to do that anyway.
Ben
------------------------------
Date: Thu, 17 Sep 2009 15:26:59 -0700
From: sln@netherlands.com
Subject: Re: matching array element to hash key
Message-Id: <gpd5b5huu5g519on4q313j9tonffjil0ra@4ax.com>
On Thu, 17 Sep 2009 13:23:43 -0700 (PDT), ccc31807 <cartercc@gmail.com> wrote:
>This is probably a real stupid question, but it's late and I'm running
>behind, and quite frankly have run out of mental energy.
>
>I have an array with about 5,000 elements that looks like this:
>0002793 0005095 0093350 0134143 0145740 0146854 0150248 0151827
>0156424 0161321 0186959 0198460 0218115
>
>I have a four level hash that looks like this:
>$hash{$s}{$l}{$h}{$id} = $terms
>This has contains about 8,000 discrete elements.
>
>The $id key in the hash either matches an array element or it does
>not. I need to write the hash keys and the values to one file if the
>$id matches the array element. I need to write the unmatching array
>elements to a second file, and the unmatching hash elements to a third
>file.
>
>Here's what I'm trying to do:
>
>foreach my $sid (@array)
>{
> if ($sid == ???)
> {
> print FIRST qq($s $l $h $id $hash{$s}{$l}{$h}{$id}\n);
> delete $hash{$s}{$l}{$h}{$id};
> shift @array;
> }
>}
>foreach (@array) { print SECOND qq{$_\n); }
>
>Then, print the remaining hash elements to THIRD
>
>I'm sorry, but for the life of me I can't figure out how to access the
>last level of the hash, at least without iterating through the hash.
>
>CC.
There is no shame in itterating.
-sln
=====================
use strict;
use warnings;
my %hash = (
s1 => {
l1 => {
h1 => {
id01 => 9487,
id02 => 9488,
bad => { id2a => 666 }
},
h2 => {
id03 => 9489,
id04 => 9490
}
},
l2 => {
h3 => {
id05 => 9491,
id06 => 9492
},
h4 => {
id07 => 9493,
id08 => 9494
}
}
},
s2 => {
l3 => {
h5 => {
id09 => 9495,
id10 => 9496,
bad => { id10a => 666 }
},
h6 => {
id11 => 9497,
id12 => 9498
}
},
bad => 3982
}
);
my $level = 0;
my @keystack = ();
my @found = ();
_GVM(\%hash);
print "$_\n" for sort @found;
exit 0;
sub _GVM {
my $var = shift;
return if ( ref ($var) ne 'HASH');
for (keys %{$var})
{
push @keystack, $_;
if (ref ($var->{$_}) eq 'HASH') {
_GVM ($var->{$_}) if ++$level < 4;
--$level;
}
elsif (ref (\$var->{$_}) eq 'SCALAR' && $level == 3) {
push @found, "@keystack $var->{$_}";
#print "@keystack $var->{$_}\n";
#print THIRD "@keystack $var->{$_}\n";
}
pop @keystack;
}
return;
}
__END__
Output:
s1 l1 h1 id01 9487
s1 l1 h1 id02 9488
s1 l1 h2 id03 9489
s1 l1 h2 id04 9490
s1 l2 h3 id05 9491
s1 l2 h3 id06 9492
s1 l2 h4 id07 9493
s1 l2 h4 id08 9494
s2 l3 h5 id09 9495
s2 l3 h5 id10 9496
s2 l3 h6 id11 9497
s2 l3 h6 id12 9498
------------------------------
Date: Thu, 17 Sep 2009 20:41:03 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: matching array element to hash key
Message-Id: <d3fddb1a-56fd-4764-8421-29fc7dc04e26@l35g2000vba.googlegroups.com>
On Sep 17, 6:07=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> > I'm sorry, but for the life of me I can't figure out how to access the
> > last level of the hash, at least without iterating through the hash.
>
> You can't. Iterate over the whole structure and build a new hash keyed
> by $id only (or, obviously, modify whatever code builds %hash to do that
> in the first place).
Haste makes waste, as they say. I was trying to do this on the quick
and dirty. Yes, you are correct, I need to put the IDs from the hash
into a separate hash. Not only is it not a big deal, it will improve
my output since I will have access to some details that I was losing
trying to do it the way I posted.
> Presumably all your $ids are unique? If they aren't, you will need to
> decide what to do with the duplicates, but you needed to do that anyway.
Yes, all the IDs are unique as to the person, but (obviously) not to
the data sets. This is trouble shooting problem with data from a
database. The two files are data files that should return exactly the
same data set, and about 85% of the data is the same. However, the
data set I'm putting in the hash has about 20% more records that the
data set I'm putting in the array, and the array has about 30 or 40
records that are unique to it, and we are trying to discover what the
difference is that would cause certain records to be returned by one
query but not the other.
Thanks, CC.
>
> Ben
------------------------------
Date: Thu, 17 Sep 2009 21:26:14 -0700 (PDT)
From: gjain <jaingaurav.08@gmail.com>
Subject: perl script execution take a long time
Message-Id: <454de36f-ea14-4c23-9d28-d85c7761f39c@v37g2000prg.googlegroups.com>
Hi,
I am having a perl script.The main script calls some 10 subroutines
which are in the same file.
Execution time of the script take around 1 and half minute which is
not desirable.
Please tell me the way to reduce the execution time.
Thanks
Gaurav
------------------------------
Date: Fri, 18 Sep 2009 00:28:45 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: perl script execution take a long time
Message-Id: <874or0c1vm.fsf@quad.sysarch.com>
>>>>> "g" == gjain <jaingaurav.08@gmail.com> writes:
g> I am having a perl script.The main script calls some 10 subroutines
g> which are in the same file.
g> Execution time of the script take around 1 and half minute which is
g> not desirable.
g> Please tell me the way to reduce the execution time.
remove line 38.
or show us the code so we can see where it is slow.
or use a profiling module to see where it is using the cpu.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 17 Sep 2009 22:19:19 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: perl script execution take a long time
Message-Id: <t066b5tmdis5v5u44jrjs947pk5jhdhfib@4ax.com>
gjain <jaingaurav.08@gmail.com> wrote:
>I am having a perl script.The main script calls some 10 subroutines
>which are in the same file.
So a rather small script.
>Execution time of the script take around 1 and half minute which is
>not desirable.
>Please tell me the way to reduce the execution time.
You need to remove line 42.
jue
------------------------------
Date: Fri, 18 Sep 2009 01:34:59 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: perl script execution take a long time
Message-Id: <87skekak8s.fsf@quad.sysarch.com>
>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
JE> gjain <jaingaurav.08@gmail.com> wrote:
>> I am having a perl script.The main script calls some 10 subroutines
>> which are in the same file.
JE> So a rather small script.
>> Execution time of the script take around 1 and half minute which is
>> not desirable.
>> Please tell me the way to reduce the execution time.
JE> You need to remove line 42.
wrong! i already said to remove line 38. line 42 does not slow it down
at all!
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 17 Sep 2009 22:47:50 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: perl script execution take a long time
Message-Id: <2j76b5pamaes0cb8ijbvk8q67jebmu0p4b@4ax.com>
"Uri Guttman" <uri@StemSystems.com> wrote:
>>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
>
> JE> gjain <jaingaurav.08@gmail.com> wrote:
> >> I am having a perl script.The main script calls some 10 subroutines
> >> which are in the same file.
>
> JE> So a rather small script.
>
> >> Execution time of the script take around 1 and half minute which is
> >> not desirable.
> >> Please tell me the way to reduce the execution time.
>
> JE> You need to remove line 42.
>
>wrong! i already said to remove line 38. line 42 does not slow it down
>at all!
Impossible! Are you suggesting that Deep Thought was wrong?
jue
------------------------------
Date: Fri, 18 Sep 2009 02:07:48 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: perl script execution take a long time
Message-Id: <87ocp8aiq3.fsf@quad.sysarch.com>
>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
JE> "Uri Guttman" <uri@StemSystems.com> wrote:
>>>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
>>
JE> gjain <jaingaurav.08@gmail.com> wrote:
>> >> I am having a perl script.The main script calls some 10 subroutines
>> >> which are in the same file.
>>
JE> So a rather small script.
>>
>> >> Execution time of the script take around 1 and half minute which is
>> >> not desirable.
>> >> Please tell me the way to reduce the execution time.
>>
JE> You need to remove line 42.
>>
>> wrong! i already said to remove line 38. line 42 does not slow it down
>> at all!
JE> Impossible! Are you suggesting that Deep Thought was wrong?
yes. he was off by 4!
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 17 Sep 2009 16:01:00 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Underwear supplier (paypal payment)( www.brandtrade08.cn )
Message-Id: <tpf5b5tt80dpcp6sjnds3lluscak7nvlel@4ax.com>
Anti VIgilante <antivigilante@pyrabang.com> wrote:
>12345678 wrote:
>> Jeans Wholesale in China Fashion Styles
>> Ecko,BBC,Armani,Prada,Evisu,D&G,RMC,Paypal Payment Exempt Freight -
[long list snipped]
Thank you very much for making sure everyone of us received a copy. My
newsreader would have filtered the spam and only thanks to your
diligence am I able to enjoy it now.
jue
------------------------------
Date: Thu, 17 Sep 2009 15:40:24 -0700
From: September Storm <it.is.me@an.invalid>
Subject: Re: Underwear supplier (paypal payment)( www.spammer.cn )
Message-Id: <sVysm.434643$Ta5.143880@newsfe15.iad>
Anti VIgilante wrote:
> Can you type this in a lisp environment and tell me the results?
>
> (defun see-spot-run (x)
> (let (x (+ 1 x))
> (print x)
> (see-spot-run x)))
>
> (see-spot-run x)
Do you plan to re-post this same thing to every spam post?
------------------------------
Date: Thu, 17 Sep 2009 23:03:34 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <maoao6-6vi.ln1@osiris.mauzo.dyndns.org>
Quoth RF <RF@NoDen.con>:
> Jim Gibson wrote:
> > In article <7hfdeqF2t777jU1@mid.individual.net>, RF <RF@NoDen.con>
> > wrote:
> >
> >> Hi Experts,
> >>
> >> About 15 years ago I dabbled in Perl and I wrote a few simple programs
> >> but now I have to confess that I am lost.
> >>
> >> I have the following instructions for setting up a Perl prog.
> >>
> >> "INSTALLATION
> >>
> >> To install this module type the following:
> >>
> >> perl Makefile.PL
> >> make
> >> make test
> >> make install."
<snip>
> >
> > The minimum executables you need are the perl interpreter and a make
> > utility. Other executables may be required by the installation process,
> > for example a C compiler if the Perl module contains any C code, but
> > that depends upon the module. Pure Perl modules should only require
> > perl and make.
> >
> > Have you tried the installation commands you listed? What happened?
> >
> > If you need more help, please post the details of your platform and any
> > error messages you might be getting.
<snip>
>
> C. BUILD
>
> Go into the newly-created directory and type:
>
> perl Makefile.PL
>
> [The CMD Prompt I input was: C:\Perlprog>perl Makefile.PL
>
> and the answer was: "'perl' is not recognized as an in operable program
> or batch file." I guess another Perl module is required]
You either don't have perl installed, or it isn't in your PATH. You can
get perl for Win32 from http://strawberryperl.com/ . If you already have
perl installed, you will have to tell us which version, where you got it
from (ActiveState or Strawberry or somewhere else), and where it is
installed.
Ben
------------------------------
Date: Thu, 17 Sep 2009 15:56:42 -0700
From: RF <RF@NoDen.con>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <7hft3cF2svvstU1@mid.individual.net>
Ben Morrow wrote:
> Quoth RF <RF@NoDen.con>:
>> Jim Gibson wrote:
>>> In article <7hfdeqF2t777jU1@mid.individual.net>, RF <RF@NoDen.con>
>>> wrote:
>>>
>>>> Hi Experts,
>>>>
>>>> About 15 years ago I dabbled in Perl and I wrote a few simple programs
>>>> but now I have to confess that I am lost.
>>>>
>>>> I have the following instructions for setting up a Perl prog.
>>>>
>>>> "INSTALLATION
>>>>
>>>> To install this module type the following:
>>>>
>>>> perl Makefile.PL
>>>> make
>>>> make test
>>>> make install."
> <snip>
>>> The minimum executables you need are the perl interpreter and a make
>>> utility. Other executables may be required by the installation process,
>>> for example a C compiler if the Perl module contains any C code, but
>>> that depends upon the module. Pure Perl modules should only require
>>> perl and make.
>>>
>>> Have you tried the installation commands you listed? What happened?
>>>
>>> If you need more help, please post the details of your platform and any
>>> error messages you might be getting.
> <snip>
>> C. BUILD
>>
>> Go into the newly-created directory and type:
>>
>> perl Makefile.PL
>>
>> [The CMD Prompt I input was: C:\Perlprog>perl Makefile.PL
>>
>> and the answer was: "'perl' is not recognized as an in operable program
>> or batch file." I guess another Perl module is required]
>
> You either don't have perl installed, or it isn't in your PATH. You can
> get perl for Win32 from http://strawberryperl.com/ . If you already have
> perl installed, you will have to tell us which version, where you got it
> from (ActiveState or Strawberry or somewhere else), and where it is
> installed.
Thank you Ben.
There was NO Perl of any kind in my computer when I downloaded the
roughly 70 files yesterday. I don't know what's built into that
structure. I guess installing could do no harm. I am running Win2K SP4,
so your juicy fruit would not work. Thanks again for your help.
------------------------------
Date: Thu, 17 Sep 2009 16:01:15 -0700
From: RF <RF@NoDen.con>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <7hftbqF2t5942U1@mid.individual.net>
RF wrote:
> Ben Morrow wrote:
>> Quoth RF <RF@NoDen.con>:
>>> Jim Gibson wrote:
>>>> In article <7hfdeqF2t777jU1@mid.individual.net>, RF <RF@NoDen.con>
>>>> wrote:
>>>>
>>>>> Hi Experts,
>>>>>
>>>>> About 15 years ago I dabbled in Perl and I wrote a few simple
>>>>> programs but now I have to confess that I am lost.
>>>>>
>>>>> I have the following instructions for setting up a Perl prog.
>>>>>
>>>>> "INSTALLATION
>>>>>
>>>>> To install this module type the following:
>>>>>
>>>>> perl Makefile.PL
>>>>> make
>>>>> make test
>>>>> make install."
>> <snip>
>>>> The minimum executables you need are the perl interpreter and a make
>>>> utility. Other executables may be required by the installation process,
>>>> for example a C compiler if the Perl module contains any C code, but
>>>> that depends upon the module. Pure Perl modules should only require
>>>> perl and make.
>>>>
>>>> Have you tried the installation commands you listed? What happened?
>>>>
>>>> If you need more help, please post the details of your platform and any
>>>> error messages you might be getting.
>> <snip>
>>> C. BUILD
>>>
>>> Go into the newly-created directory and type:
>>>
>>> perl Makefile.PL
>>>
>>> [The CMD Prompt I input was: C:\Perlprog>perl Makefile.PL
>>>
>>> and the answer was: "'perl' is not recognized as an in operable
>>> program or batch file." I guess another Perl module is required]
>>
>> You either don't have perl installed, or it isn't in your PATH. You can
>> get perl for Win32 from http://strawberryperl.com/ . If you already have
>> perl installed, you will have to tell us which version, where you got it
>> from (ActiveState or Strawberry or somewhere else), and where it is
>> installed.
>
> Thank you Ben.
>
> There was NO Perl of any kind in my computer when I downloaded the
> roughly 70 files yesterday. I don't know what's built into that
> structure. I guess installing could do no harm. I am running Win2K SP4,
> so your juicy fruit would not work. Thanks again for your help.
I wrote too soon. On the page following your link there were other progs
and for Win2K too :-)
------------------------------
Date: Thu, 17 Sep 2009 18:55:08 -0700
From: RF <RF@NoDen.con>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <7hg7huF2ta7qoU1@mid.individual.net>
RF wrote:
> Ben Morrow wrote:
>> Quoth RF <RF@NoDen.con>:
>>> Jim Gibson wrote:
>>>> In article <7hfdeqF2t777jU1@mid.individual.net>, RF <RF@NoDen.con>
>>>> wrote:
>>>>
>>>>> Hi Experts,
>>>>>
>>>>> About 15 years ago I dabbled in Perl and I wrote a few simple
>>>>> programs but now I have to confess that I am lost.
>>>>>
>>>>> I have the following instructions for setting up a Perl prog.
>>>>>
>>>>> "INSTALLATION
>>>>>
>>>>> To install this module type the following:
>>>>>
>>>>> perl Makefile.PL
>>>>> make
>>>>> make test
>>>>> make install."
>> <snip>
>>>> The minimum executables you need are the perl interpreter and a make
>>>> utility. Other executables may be required by the installation process,
>>>> for example a C compiler if the Perl module contains any C code, but
>>>> that depends upon the module. Pure Perl modules should only require
>>>> perl and make.
>>>>
>>>> Have you tried the installation commands you listed? What happened?
>>>>
>>>> If you need more help, please post the details of your platform and any
>>>> error messages you might be getting.
>> <snip>
>>> C. BUILD
>>>
>>> Go into the newly-created directory and type:
>>>
>>> perl Makefile.PL
>>>
>>> [The CMD Prompt I input was: C:\Perlprog>perl Makefile.PL
>>>
>>> and the answer was: "'perl' is not recognized as an in operable
>>> program or batch file." I guess another Perl module is required]
>>
>> You either don't have perl installed, or it isn't in your PATH. You can
>> get perl for Win32 from http://strawberryperl.com/ . If you already have
>> perl installed, you will have to tell us which version, where you got it
>> from (ActiveState or Strawberry or somewhere else), and where it is
>> installed.
>
> Thank you Ben.
>
> There was NO Perl of any kind in my computer when I downloaded the
> roughly 70 files yesterday. I don't know what's built into that
> structure. I guess installing could do no harm. I am running Win2K SP4,
> so your juicy fruit would not work. Thanks again for your help.
When I try to run the Perl prog, I receive:
C:\Perlprog>perl makefile.pl
Can't open perl script "makefile.pl": No such file or directory.
Now that I have Strawberry installed, it gives me the same message as
before the installation.
I looked through all the Perl files and here is the list of the Makefiles:
Top folder: Makefile.in, Makefile-xx.in, Makefile.PL.in
Bottom folder: Makefile.in.in.
There was no Makefile.PL.
Back to the drawing board ;-)
------------------------------
Date: Fri, 18 Sep 2009 06:04:51 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <j0hbo6-78n.ln1@osiris.mauzo.dyndns.org>
Quoth RF <RF@NoDen.con>:
> Ben Morrow wrote:
> > Quoth RF <RF@NoDen.con>:
> >>
> >> and the answer was: "'perl' is not recognized as an in operable program
> >> or batch file." I guess another Perl module is required]
> >
> > You either don't have perl installed, or it isn't in your PATH. You can
> > get perl for Win32 from http://strawberryperl.com/ . If you already have
> > perl installed, you will have to tell us which version, where you got it
> > from (ActiveState or Strawberry or somewhere else), and where it is
> > installed.
>
> There was NO Perl of any kind in my computer when I downloaded the
> roughly 70 files yesterday. I don't know what's built into that
> structure.
When you say 'that structure' you mean the package you originally
downloaded? I would be extremely surprised if it included a copy of
perl.
> I guess installing could do no harm. I am running Win2K SP4,
> so your juicy fruit would not work. Thanks again for your help.
The latest Strawberry builds have dropped support for 2k, but older
releases are available from http://strawberryperl.com/releases.html . I
would recommend using the 5.8.9.1 release from that page.
(Also, it's not a fruit so much as a flavour of icecream :).)
Ben
------------------------------
Date: Fri, 18 Sep 2009 06:09:06 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Using Perl's Bits 'n Pieces ;-)
Message-Id: <i8hbo6-78n.ln1@osiris.mauzo.dyndns.org>
Quoth RF <RF@NoDen.con>:
>
> When I try to run the Perl prog, I receive:
>
> C:\Perlprog>perl makefile.pl
> Can't open perl script "makefile.pl": No such file or directory.
>
> Now that I have Strawberry installed, it gives me the same message as
> before the installation.
>
> I looked through all the Perl files and here is the list of the Makefiles:
>
> Top folder: Makefile.in, Makefile-xx.in, Makefile.PL.in
What, exactly, are you trying to install, and where did you get it from?
Either this isn't just a Perl program and the INSTALL file shouldn't be
there, or you've downloaded a development snapshot not intended for end
users.
One would normally expect a file called Makefile.PL.in to be converted
to a file called Makefile.PL by a shell script called configure, but
since you're on Win32 you can't run such a shell script even if it is
there. There are some instructions somewhere that you've missed.
Ben
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 2601
***************************************