perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Cullin <jcul...@unipress.com>
Subject Re: Mod Perl Code failures
Date Thu, 26 May 2005 13:25:52 GMT
> >   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


Mime
View raw message