It's a special case of something that's unmentioned: creating temporary values in aggregates.
That's a great point. If you missed it, consider this:
my $item = 'wibble'; my @things = qw /foo bar baz/; local $things = 'qux'; # Legal local $item = 'wobble'; # Dies with 'Can't localize lexical variable + $item'
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>