Re: Mod Perl Code failures

[prev] [thread] [next] [Date index for 2005/05/26]

From: Joe Cullin
Subject: Re: Mod Perl Code failures
Date: 13:25 on 26 May 2005
> >   sub strip_end_data_segment {
> > -    ${ +shift->{CODE} } =~ s/__(END|DATA)__(.*)//s;
> > +    ${ +shift->{CODE} } =~ s/^__(END|DATA)__(.*)//ms;
> >   }
> Sorry for the random, and probably naive question. What does the + in
> front of the shift do?
> -- 
> Regards,
> Iain

Check out "perldoc perlref" (search for "disambiguate").  Basically, the +
just makes sure that perl interprets the { in front of shift as a hash ref
and not as the start of a block of code.

-Joe

Re: Mod Perl Code failures
Stas Bekman 17:12 on 25 May 2005

Re: Mod Perl Code failures
iain hubbard 09:23 on 26 May 2005

Re: Mod Perl Code failures
Joe Cullin 13:25 on 26 May 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52