At 09:39 +0100 2001.03.06, Bart Lateur wrote:
>On Mon, 05 Mar 2001 21:54:26 +0100, Giorgio Valoti wrote:
>
>>As a real newbie I have to ask why should I avoid the eval... Also, in
>>which situation you would recommend its use, other than trapping otherwise
>>fatal errors?
>
>Because the "code" rea
Bart Lateur wrote:
>
> >Content-Type: application/x-pkcs7-signature; name="smime.p7s"
> >Content-Description: S/MIME Cryptographic Signature
>
> Please don't do that. There's no need to send a useless (to us) 1.7kb
> attachment to every recipient, and store it forever in the mail
> archives.
I w
On Mon, 05 Mar 2001 21:54:26 +0100, Giorgio Valoti wrote:
>As a real newbie I have to ask why should I avoid the eval... Also, in
>which situation you would recommend its use, other than trapping otherwise
>fatal errors?
Because the "code" really is a string, and it needs to be recompiled
every
Chris Nandor wrote:
> At 10:50 +0100 2001.03.05, Bart Lateur wrote:
> >eval() should still work.
> >
> > eval("\$something =~ m/regex/$switch")
>
> My preferred method, FWIW, is:
>
> my $result;
> if ($switch eq 'i') {
> $result = $something =~ m/regex/i;
>
on 03/05/2001 01:47 PM, Ronald J Kimball at
[EMAIL PROTECTED] wrote:
>
> 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
you forgot an additi
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
At 10:50 +0100 2001.03.05, Bart Lateur wrote:
>eval() should still work.
>
> eval("\$something =~ m/regex/$switch")
My preferred method, FWIW, is:
my $result;
if ($switch eq 'i') {
$result = $something =~ m/regex/i;
} else {
$result =
On Mon, 05 Mar 2001 10:33:05 +0100, Giorgio Valoti wrote:
>Hi all,
>perhaps it's a silly question but what I'd like to do is something like:
>
>#
>#pseudocode
>#
>my $switch = 'i';
>if ($something =~ m/regex/$switch) {
>...
>}
>
>I tried with eval and double quoting interpolation with no luck. Is
Hi all,
perhaps it's a silly question but what I'd like to do is something like:
#
#pseudocode
#
my $switch = 'i';
if ($something =~ m/regex/$switch) {
...
}
I tried with eval and double quoting interpolation with no luck. Is
something like this possible?
TIA
--
Giorgio Valoti
Magnetic Media Ne