On Mon, Mar 05, 2001 at 10:50:07AM +0100, Bart Lateur wrote:
> In 5.6.0:
> 
>       $_ = 'Yet Another Perl Hacker';
>       $switch = 'i';
>       print /(?$switch:PERL)/?'Y':'N';
> -->
>       Y
> 
> But, it doesn't work in 5.004/MacPerl.
> 

In 5.004/MacPerl, try this instead:

$_ = 'Yet Another Perl Hacker';
$switch = 'i';
print /(?$switch)PERL/'Y':'N';


(?imsx) was in 5.004; (?imsx:PATTERN) was added later.


Ronald

Reply via email to