comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
July 2006
motuwethfrsasuw
     12 26
3456789 27
10111213141516 28
17181920212223 29
24252627282930 30
31       31
2006
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Comparing values of multiple hash keys         


Author: Jason
Date: Jul 25, 2006 23:50

In the past I've written a simple search engine and have been using it
for awhile, but now I'm trying to make it a little more intuitive.

Originally, the script was simple. Take a keyword entered by a form,
compare it to each value of an array (@data), and return any value
containing the entry:

$var = param('keyword');
foreach $key (@data) {
if ($key =~ /$var/i) { push (@founddata, $key); }
}

But now I'm trying to allow for multi-word phrases, which is a bit more
complex. I couldn't find how others are doing it, so I'm winging it on
my own. I started by splitting $var by the whitespace into an array,
counting the number of instances that $var appeared in the $key, then
adding the results to a hash value:

my (%%founddata, @keywords);
my $var = param('keyword');

$var =~ s/(?:,|'|\.)//g; # Remove comma, apostrophe, or period
@keywords = split(/ /, $var);
Show full article (1.90Kb)
5 Comments
  has anyone hre tried gantry? is it nice?         


Author: gavino
Date: Jul 25, 2006 21:39

gantry looksed bombastic
no comments
  Re: using session managment in perl         


Author: Ben Morrow
Date: Jul 25, 2006 21:30

Quoth "madan" gmail.com>:


Please stop changing your From: address.

Ben

--
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
benmorrow@tiscali.co.uk Groucho Marx
no comments
  anyone here tried higher order perl by dominus? I found it free online and it seems very interesting         


Author: gavino
Date: Jul 25, 2006 21:19

It says how perl is not limited to being a c clone.
And I am wondering if perl is a good way for me to get into programming
or should I go straight to something supposedly powerful like lisp?
smalltalk or haskell?
3 Comments
  anyone here running maypole, is it awesome?         


Author: gavino
Date: Jul 25, 2006 21:18

maypole by simon
no comments
  Re: Semantics of threads         


Author: Ben Morrow
Date: Jul 25, 2006 21:10

Quoth Bo Lindbergh :
> In article <2flip3-m8d.ln1@osiris.mauzo.dyndns.org>,
> Ben Morrow tiscali.co.uk> wrote:
>
>> Quoth Bo Lindbergh :
>>>
>>> Really? I looked at the source and found no attempts to block other
>>> threads from running between the fork and the exec.
>>
>> I think you're suffering from the same misconception as I was: fork
>> doesn't duplicate all the threads in the process, only the calling
>> thread.
>
> So you claim that it's a documentation error: the "some UNIX systems
> copy all the current threads into the child process" part should be
> removed from perlthrtut?
Show full article (1.31Kb)
no comments
  Re: Semantics of threads         


Author: Bo Lindbergh
Date: Jul 25, 2006 18:22

In article <2flip3-m8d.ln1@osiris.mauzo.dyndns.org>,
Ben Morrow tiscali.co.uk> wrote:
> Quoth Bo Lindbergh :
>>
>> Really? I looked at the source and found no attempts to block other
>> threads from running between the fork and the exec.
>
> I think you're suffering from the same misconception as I was: fork
> doesn't duplicate all the threads in the process, only the calling
> thread.

So you claim that it's a documentation error: the "some UNIX systems
copy all the current threads into the child process" part should be
removed from perlthrtut?

/Bo Lindbergh
no comments
  Re: UNIVERSAL::isa($object, 'UNIVERSAL') returns false?         


Author: Kevin Michael Vail
Date: Jul 25, 2006 18:21

In article <44c2d8d9$0$22362$afc38c87@news.optusnet.com.au>,
"Sisyphus" nomail.afraid.org> wrote:
> "Kevin Michael Vail" vaildc.net> wrote in message
> news:kevin-9A3177.20500722072006@news.verizon.net...
>> I ran across a problem yesterday that I traced back to this line in
>> Callback.pm:
>>
>> if (ref $func ne 'CODE' && UNIVERSAL::isa($func, "UNIVERSAL")) {
>>
>
> What is Callback.pm ? I don't seem to have it (though I do have As build
> 638).

Oh, sorry, it's the Callback module (from CPAN) - a means of doing
Tk-like callbacks but in normal Perl code.
Show full article (3.97Kb)
no comments
  FAQ 4.15 How can I take a string and turn it into epoch seconds?         


Author: PerlFAQ Server
Date: Jul 25, 2006 18:03

This is an excerpt from the latest version perlfaq4.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 .

--------------------------------------------------------------------

4.15: How can I take a string and turn it into epoch seconds?

If it's a regular enough string that it always has the same format, you
can split it up and pass the parts to "timelocal" in the standard
"Time::Local" module. Otherwise, you should look into the "Date::Calc"
and "Date::Manip" modules from CPAN.

--------------------------------------------------------------------

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.
Show full article (1.37Kb)
no comments
  is perl a mess as it scales, and is it really hard to debug?         


Author: gavino
Date: Jul 25, 2006 17:50

I hear people bitch about perl but others say its most productive
language.
2 Comments
1 2 3 4 5