in reply to Re: regexp searches over array slices
in thread regexp searches over array slices
Um,
Well, Perl 6 will let you do: if (@array[3,4] ^=~ /\S/) { ... }so, in Perl 6, will that mean "and" or "or"?
That is, I recall ^=~ being able to work over a list, but what will if do with the resulting list? Will /\S/ be given a list context so that it returns an empty list upon failure so the final list is empty if and only if both matches failed?
In other words, does it become this? if( map {/\S/} @array[3,4] ) { (which has the same effect as the grep version but for slightly different reasons).
So, I think I've answered my own question but I'll post this anyway as I think some might find it interesting.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: regexp searches over array slices
by TheDamian (Vicar) on Nov 09, 2001 at 11:37 UTC | |
by japhy (Canon) on Nov 09, 2001 at 19:49 UTC | |
by tilly (Archbishop) on Nov 09, 2001 at 22:15 UTC | |
by tye (Sage) on Nov 09, 2001 at 20:36 UTC | |
by TheDamian (Vicar) on Nov 11, 2001 at 02:20 UTC | |
by tye (Sage) on Nov 12, 2001 at 02:59 UTC | |
by TheDamian (Vicar) on Nov 15, 2001 at 01:09 UTC | |
| |
|
Re: (tye)Re: regexp searches over array slices
by japhy (Canon) on Nov 09, 2001 at 03:49 UTC |