[Templates] segmentation fault

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


Mark Mills <mark@xodiax.com> writes:

> David Dyer-Bennet wrote:
> >         if ($aif->{fpath} =~ /\/encyclopedia\/(.*)\/index\.html$/ ) {
> >             print "foo $1";
> > Produces a segmentation fault.  See that print "foo $1" just after
> > the regexp match in the if
> > statement?  If you take the $1 out of the string, the segmentation
> > fault goes away!!!!  So apparently I'm allowed to do the regexp match,
> > but not to know what the parenthesized bit actually matched.
> > Bummer!
> 
> What happens if you do:
> 
> 		my $foo = "foo $1";
> 		print $foo;
> 
> Does that seg-fault too?

Yep, identical behavior.
-- 
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/>