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 (
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
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
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)
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 =
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
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
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
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
10 matches
Mail list logo