I have a list of characters. I need to get a
list of all possble sequences of these characters for example.
I have a string that consists of '-mevqgn' I need
to pattern match any combination of 'mevqgn' with a preceding - or
--.
Right now this is what I am doing but it is very
ugly and
I have written a little app, where I would like to dynamically create a
directory of resource providers, using Perl OLE and Word10. I would
like the directory to contain:
1. A full page color graphic
2. Table of Contents
3. Contents: each resource provider listed on a page, separated by a
hello,
i'm attempting to execute the following
query against a MS SQL 2000 db. only the first instance of the results are
being returned. i'm not sure if i'm using the correct method and hope that
someone can point me in the right direction... this is my first time
trying to use cursors with
Dax T. Games wrote:
I have a list of characters. I need to get a list of all possble
sequences of these characters for example.
I have a string that consists of '-mevqgn' I need to pattern match any
combination of 'mevqgn' with a preceding - or --.
Right now this is what I am doing
I wanted to use tr but was uanble to accomplish the
task that way. So I used regex like the following:
use strict;
my %MCTWW = qw(m -1 e -1 v -1 q -1 g -1 n -1);my $MyCharsToWorkWith =
\%MCTWW;
$_ = '--mepqgn ';
if ( ! /-{1,2}(\S+)/ ) { printf "Expecting a hyphen
or two floowed by non
Have you tried playing around with character sets? Something like
$target = 'mevqgn';
$length_target = length $target;
if ( $LS_Val =~ /-{1,2}[$target]{$length_target}/ ) {
#do something
}
Whether the above would work for you would depend on whether the code
can ignore positive matches on
Here
is another variation...
#!/usr/bin/perl
check('-mevqgn');check('-memqgn');check('-ngmevq');check('--meqvgn');
sub check{ my $LS_Val = shift;
if ($LS_Val =~ /-{1,2}([mevqgn]{6})/ and
unique_chars($1)) { print "Ding
Ding! $LS_Val is good!\n"; } else
{ print "Flopped:
$LS_Val\n"; }}
On Tue, 2 Sep 2003, steve silvers wrote:
With the below snippet, the numbers 8 and 9 work great, but 08 and
09 give the error Illegal octal digit '9' or '8'. I read that these are
two numbers that will have this problem! How do I get around this problem?
Ohh, don't use leading zeros on
I've searched cpan but only found some APIs to several search engines...
I want to parse search string and split parameters. like user can put a plus
sign for wanted words and minus for not-wanted or put single or double
quotes or some other weird thing etc... if such a module exists I'd like to
On Tue, 2 Sep 2003, Dax T. Games wrote:
I have a list of characters. I need to get a list of all possble sequences of these
characters for example.
I have a string that consists of '-mevqgn' I need to pattern match any combination
of 'mevqgn' with a preceding - or --.
Right now this is
Wow... looks like some good replies to this one. Here's a less
elegant, recursive approach (until I learn map :-)
#!perl -w
# print all 720 permutations using letters: e m v q g n
use strict;
sub mutate {
my ($in) = @_;
if (length($in) == 6) {
print $in\n;
$in = '';
} else {
I don't know of any module that does all of that automatically, but there
are good ways to do it if you feel like learning something new.
Parse::RecDescent is a parser builder. You supply a grammer (rules), and it
builds a parser that can parse that grammer.
Burak Grsoy wrote:
I've searched cpan but only found some APIs to several search engines...
And what do you need that's different from what they provide ?
I want to parse search string and split parameters. like user can put a plus
sign for wanted words and minus for not-wanted or put single
Well, upon further review, the answer requires less work than I thought.
Here is the detail for the two Linux NICs:
NIC =eth0
MAC =000102EAEC0F
OctetStr = 0x000102eaec0f
NIC =eth1
MAC =00B0D0254A27
OctetStr = 0x00b0d0254a27
I was looking at the OctetStr for
It looks like you may be doing standard command line option
parsing (or almost standard as the '--' prefix is reserved
for long option names). If this is so, look at GetOpt::Std .
For a subroutine that does what you specified (tested):
sub is_DTG_Option ($)
{
my $opt = shift;
return
Equally dirty, but possibly more flexible:
$_='aSdFgHjk'; # Letters to look
for.
$alpha1=lc(join('',sort(split(//;
$LS_Val=shift;
$LS_Val=~s/^-//g; # Drop preceding dashes
$alpha2=lc(join('',sort(split(//,$LS_Val;
if
($alpha1 eq $alpha2) {print "Pattern found!\n";}
Brad Smith wrote:
I have written a little app, where I would like to dynamically create
a directory of resource providers, using Perl OLE and Word10. I would
like the directory to contain:
1. A full page color graphic
2. Table of Contents
3. Contents: each resource provider listed on a
At 01:26 PM 9/2/2003, Dax T. Games wrote:
I have a
list of characters. I need to get a list of all possble sequences
of these characters for example.
I have a string that consists of '-mevqgn' I
need to pattern match any combination of 'mevqgn' with a preceding - or
--.
Right now this is what
Hi!
Thenks for everybody who helped me! It works! :) One question more:
How can I download a perl module (whit ppm) to save it to a floppy, and install
it on a machine, where isn't internet connection?
(I don't understand why isn't it installed when win32::SerialPort is in the
base, and it uses
To download/install PPM's with Floppy or other media:
Assumption: a:\ is your local directory with the modules. This can be any
directory you'd like.
1. Download .ppd file and .tgz file for modules (from ActiveState and other
repositories). Save to a:\.
2. Modify the CODEBASE tag in the .ppd
Brad,
You where almost there. Try inserting a section break instead of a page break, then
select the range following the section break for the margin change. This is like
choosing 'From this point forward' in the 'Apply To' combo box in Page Setup.
use Win32::OLE;
use Win32::OLE::Const
$Bill Luebkert wrote:
Dax T. Games wrote:
I have a list of characters. I need to get a list of all possble
sequences of these characters for example.
I have a string that consists of '-mevqgn' I need to pattern match any
combination of 'mevqgn' with a preceding - or --.
Right now this
On Tue, 2 Sep 2003, Keith C. Ivey wrote:
steve silvers [EMAIL PROTECTED] wrote:
use strict;
my @numbers = (4,09,15); # 09 will error, 9 won't error
my @numbers2 = (2,4,11);
my (%hash_lookup,%hash_lookup2);
@[EMAIL PROTECTED] = ('Y') x @numbers;
If you had 07 it wouldn't give an
how
about sorting the letters first:
$var="meqgvn";
$sortedvar=join("", sort(split("",
$var)));
if
($sortedvar eq "egmnqv") { print
"yes!\n";}
--ken
-Original Message-From: Dax T. Games
[mailto:[EMAIL PROTECTED]Sent: Tuesday, September 02, 2003
12:26 PMTo: Perl
24 matches
Mail list logo