..
>
> By doing the above, you match against whole name
> if n-4.t-1 is passed or
> only the node if t-1 is passed. I could be missing
> something.
>
> Wags ;)
> -Original Message-
> From: Lynn Glessner [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August
o:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 10:18
To: Sofia; [EMAIL PROTECTED]
Subject: Re: Matching strings
I think that you just need to match the other way around to get the partial
match.
Instead of looking for the fileline within the name_passed, look for the
name_passed within the fi
I think that you just need to match the other way around to get the partial
match.
Instead of looking for the fileline within the name_passed, look for the
name_passed within the fileline.
Something like this should do the desired partial match, and be shorter and
clearer (at least to me, another
Don't diddle with $_ so much... You make things more confusing Here is
what I see (forgive any formatting errors, using Lotus NOTes)...
while() {
$line = $_; # You are setting $line to the current value from
chomp($line); # Getting rid of \n's etc.. (EOL chars)
# Now here, why a
--- Martin van-Eerde <[EMAIL PROTECTED]> wrote:
> could you walk me through @h{@vars} = ()
> I think it means many keys of the hash will be assigned an
> undefined list.
> I dont understand the @ meaning array in @h !!
> > my %h;
> > @h{@vars} = ();
> > if (keys %h != @vars) { $youlose = "yes" }
could you walk me through @h{@vars} = ()
I think it means many keys of the hash will be assigned an
undefined list.
I dont understand the @ meaning array in @h !!
Thanks
> my %h;
> @h{@vars} = ();
> if (keys %h != @vars) { $youlose = "yes" }
>
>
> --
> Peter Scott
> Pacific Systems Design
could you walk me through @h{@vars} = ()
I think it means many keys of the hash will be assigned an
undefined list.
I dont understand the @ meaning array in @h !!
Thanks
> my %h;
> @h{@vars} = ();
> if (keys %h != @vars) { $youlose = "yes" }
>
>
> --
> Peter Scott
> Pacific Systems Design
> Observe, ye doubter:
>
> $ perl -le '@vars = qw(one two three two); @h{@vars} - (); print
> "Duplicate in (@vars)" unless keys %h == @vars; @vars = qw(one two three
> four);
> @hh{@vars} = (); print "Duplicate" unless keys %hh == @vars'
> Duplicate in (one two three two)
> $
>
> Because.. wh
On Thu, 28 Jun 2001, twelveoaks <[EMAIL PROTECTED]> wrote,
> Peter Scott Wrote:
>
> > my %h;
> > @h{@vars} = ();
> > if (keys %h != @vars) { $youlose = "yes"; }
>
>
> Maybe I'm missing something - won't these *always* match, since @vars has
> been used to create keys %h?
No, depends on the conte
At 09:37 PM 6/28/01 -0400, twelveoaks wrote:
>Peter Scott Wrote:
>
> > my %h;
> > @h{@vars} = ();
> > if (keys %h != @vars) { $youlose = "yes"; }
>
>Maybe I'm missing something - won't these *always* match, since @vars has
>been used to create keys %h?
>
>It seems that way when I test it.
>
>What
Peter Scott Wrote:
> my %h;
> @h{@vars} = ();
> if (keys %h != @vars) { $youlose = "yes"; }
Maybe I'm missing something - won't these *always* match, since @vars has been used to
create keys %h?
It seems that way when I test it.
What I want to detect is whether any two of the values within
At 08:52 PM 6/28/01 -0400, twelveoaks wrote:
>I have a series of variables, say,
> $var0 $var1 $var2 $var3...
>up to lots and lots depending on user input.
>
>They are also available as an array
> @vars = (element1, element2,...)
>
>I want to test to see if any two of their values
First you would need to do a string compare vs numeric compare(ie,
eq vs == ). If they can never enter the same response or value and you
don't care about capitalization, then you could use a hash and either
lower/upper case the input. If key exists and/or is defined, then would have
to r
13 matches
Mail list logo