Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
of this:'fudge' does not match 'fudge'
use strict; sub test_reg1 { return "fudge"; } sub test_reg2 { print "'",$_,(/&test_reg1/i ? "' matches '" : "' does not match '" +),&test_reg1,"'\n"; } $_ = "fudge"; &test_reg2("fudge");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange behaviour of m and $_
by Fletch (Bishop) on Oct 17, 2006 at 22:20 UTC | |
by ysth (Canon) on Oct 18, 2006 at 00:10 UTC | |
by ikegami (Patriarch) on Oct 18, 2006 at 01:01 UTC | |
|
Re: Strange behaviour of m and $_
by jeffa (Bishop) on Oct 17, 2006 at 22:17 UTC |