On 10/03/2006 11:37 AM, Derek B. Smith wrote:
returns "true" or "false" (1 or '') and in list
context it returns the
contents of any capturing parentheses in the
pattern.
The expression:
( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
)[ 0 ]
is a list slice so the regular expression is in
Umm... So would this do what I want also?
($ptype)=($projection =~ /movable.+(sine|geo|radial|ortho)/i)
or $ptype="(missing)";
I think the correct is:
$ptype = ($projection =~ /movable.+(sine|geo|radial|ortho)/i) ||
"(missing)";
'||' will be tight with ( $projection =~ ... )
> Bryan R Harris wrote:
>>
returns "true" or "false" (1 or '') and in list context it returns the
contents of any capturing parentheses in the pattern.
The expression:
( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
)[ 0 ]
is a list slice so the
Bryan R Harris wrote:
>
>>>returns "true" or "false" (1 or '') and in list context it returns the
>>>contents of any capturing parentheses in the pattern.
>>>
>>>The expression:
>>>
>>>( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
>>>)[ 0 ]
>>>
>>>is a list slice so the regular expression is
>> returns "true" or "false" (1 or '') and in list context it returns the
>> contents of any capturing parentheses in the pattern.
>>
>> The expression:
>>
>> ( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
>> )[ 0 ]
>>
>> is a list slice so the regular expression is in list context but th
> returns "true" or "false" (1 or '') and in list
> context it returns the
> contents of any capturing parentheses in the
> pattern.
>
> The expression:
>
> ( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
> )[ 0 ]
>
> is a list slice so the regular expression is in list
> context but the sl
> Jen Spinney wrote:
>> On 10/2/06, Mumia W. <[EMAIL PROTECTED]> wrote:
>>>
>>> Yes, and here is another way:
>>>
>>> $ptype = (($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i)[0]) ||
>>> '(missing)';
>>
>> How does that way work? I was curious, so I tested it myself and it
>> clearly did
Jen Spinney wrote:
> On 10/2/06, Mumia W. <[EMAIL PROTECTED]> wrote:
>>
>> Yes, and here is another way:
>>
>> $ptype = (($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i)[0]) ||
>> '(missing)';
>
> How does that way work? I was curious, so I tested it myself and it
> clearly did work, but I hav
On 10/2/06, Mumia W. <[EMAIL PROTECTED]> wrote:
On 10/02/2006 01:54 PM, Rob Dixon wrote:
> Bryan R Harris wrote:
>>
>> **
>> $ptypeline = "#movableortProjortho0.0000.000";
>>
>> ($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho
On 10/02/2006 01:54 PM, Rob Dixon wrote:
Bryan R Harris wrote:
**
$ptypeline = "#movableortProjortho0.0000.000";
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) ||
"(missing)";
print $ptype, "\n";
***
Bryan R Harris wrote:
**
$ptypeline = "#movableortProjortho0.0000.000";
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) || "(missing)";
print $ptype, "\n";
**
The above code prints
11 matches
Mail list logo