in reply to Re^2: Alternative matches
in thread Alternative matches

Err...

$r = index $lcstring, $val;; $ret = substr $string, $r, length $val;
Seems like a very obfuscated way of saying $ret = $val if -1 < index $lcstring, $val;
No?

Replies are listed 'Best First'.
Re^4: Alternative matches
by PodMaster (Abbot) on Oct 06, 2004 at 12:29 UTC
    No. Pay attention:
    my $string = q~whatever the NEw old you're trying to match~;

    my $lcstring = lc $string;

    the $1 (aka ret) is => NEw

    $string ne lc $string

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.