[Templates] segmentation fault

David Dyer-Bennet dd-b@dd-b.net
25 Oct 2003 15:15:17 -0500


"Mark D. Anderson" <mda@discerning.com> writes:

> I've run into this in perl 5.6 (not perl 5.8) before as well.
> It typically seems to happen when $1 is bound in a lexical context
> where it is already bound.
> I've had to work around by doing things like:
>    my ($fname) = ($aif->{fpath} =~ /\/encyclopedia\/(.*)\/index\.html$/ );
>    if ($fname) {
>              print "foo $fname";

That appears to work, at least in the test case.  But I don't have the
slightest understanding of *how* it works!  How does $fname end up
bound to the paren contents?  Is this in the perldoc anywhere?

Is perl 5.8 a reasonably safe upgrade from 5.6?
-- 
David Dyer-Bennet, <dd-b@dd-b.net>, <www.dd-b.net/dd-b/>
RKBA: <noguns-nomoney.com> <www.dd-b.net/carry/>
Photos: <dd-b.lighthunters.net>  Snapshots: <www.dd-b.net/dd-b/SnapshotAlbum/>
Dragaera/Steven Brust: <dragaera.info/>