Re: RegEx again

2007-05-20 Thread Ken Foskey
On Sun, 2007-05-20 at 01:42 -0400, yitzle wrote: # Look in @list1 = qw/big bad blue ball/; @list2 = qw/box sand house/; @keywords = qw/brown black blue/; # Add a ^ and $ so the strings match fully push @search, qr/^$_$/ for ( @keywords ); $searchRegEx = join '|',@search; print 1 if (

Re: how do I use a module without installing it?

2007-05-20 Thread David Moreno Garza
Bryan R Harris wrote: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? If so, how is it done? http://www.cpan.org/misc/cpan-faq.html#How_install_private -- David

Re: RegEx again

2007-05-20 Thread Dr.Ruud
yitzle schreef: Subject: RegEx again. Please put your question in the Subject. Your question is more like: how to compare two arrays (And it doesn't even have to use a regular expression, right?) -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: RegEx again

2007-05-20 Thread yaron
Hi, Assuming @keywords and @list1 and @list2 you can use Array::Diff (http://search.cpan.org/~typester/Array-Diff-0.04/lib/Array/Diff.pm) use Array::Diff; @list1 = qw/big bad blue ball/; @list2 = qw/box sand house/; @keywords = qw/brown black blue/; @list1 = sort(@list1); @list2=sort(@list2)

OOP

2007-05-20 Thread Octavian Rasnita
Hi, I am trying to subclass the module Path::Class::Dir but without success. If I create a simple program like the following, the subdir() method works fine, but it doesn't work if I create a subclass of the module and try to use that method. use Path::Class::Dir; my $dir =

Re: RegEx again

2007-05-20 Thread Romeo Theriault
I got two arrays of strings. I am trying to search to see if any of the strings of one array matches a string of the other array. Lists to search: qw/big bad blue ball/, qw/box sand house/ Search list: qw/brown black blue/ I should be able to get list #1 but not list #2 because the

list test (please ignore)

2007-05-20 Thread Tony Heal

logic not working

2007-05-20 Thread Tony Heal
OK I am probably missing something stupid, but I can not get this to work. The output should be 'Daily-{day of week)-{MMM}-{DD}-{}' for Sunday thru Friday and 'Weekly-{1|2|3}-{day of week)-{MMM}-{DD}-{} for Saturday and every fourth Saturday should start rotating months

Regarding files

2007-05-20 Thread Dharshana Eswaran
Hi All, The below code helps in reading a file in reverse: use strict; use warning; open( FILE, $file_to_reverse ) or die( Can't open file file_to_reverse: $! ); @lines = reverse FILE; foreach $line (@lines) { # do something with $line } But i am trying to grep for a string in the file

AW: Net::Ping Bug found?

2007-05-20 Thread Angerstein
Ethereal would do, too. Start Ethereal and then start the first script. Stop Ethereal save capture file. Start second capture. Run the second skript. Stop trace. Post it. You can do it with most packetsniffers, but some like tcpdump on aix are very basic and they do not show details of icmp