in reply to Matching a truncated word
I think that in this case the best approach uses substr:
or alternativelymy $matched = do { my $i = length $_; $_ eq substr "foobar",0,$i; };
(if we're going to use special variables, may as well do it right...)my $matched = ($_ eq substr "foobar",0,length);
The idea is from the CB discussion that led to <plug type="shameless">this snippet </plug>, which seems to work--I am hopeful therefore that this will also work. :-)
|
|---|