In message <[email protected]>,
Risto Vaarandi writes:
>hi John,

Hi Risto:

>within SEC code, match variables are set in the following way:
>
>@var = ($input =~ /regexp/)
>
>This construct will assing the values for all ()-operators to the @var array.
> However, if there are no ()-operators in the matching regular expression, 
> Perl will return the list ( 1 ), in order to indicate a match [...]
> That's why $1 is set to 1 in the case of match, even if there are no
> ()-operators in the regular expression. I acknowledge that this is a
> sort of idiosyncrasy, but implementing a special check for this case
> would make the match_regexp() routine much slower than it is now.

Ok, that makes sense and is pretty much what I figured was the
cause. I am not sure if it's worth adding to the man page under
pattern2 discussion or maybe an Idiosyncrasy section (referenced from
pattern 2) since it's unlikely to be tripped over (although I managed
to do it during the lesson plan development).

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to