Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

statico (5018)

AOL IM: eisforian (Add Buddy, Send Message)


Co-author of Perl Testing: A Developer's Notebook []

Journal of statico (5018)

Thursday October 06, 2005
04:09 PM

limited lookahead

[ #27050 ]

<statico> This is driving me nuts. Can anyone find the syntax error: my
           @lines = map { "$\n", "$_\_bar.baz\n" } map { quux($_) }
<integral> are those hashes or blocks?
<statico> Blocks.
<statico> Or, at least, they should be.
<integral> did you remind perl of that?
<statico> "Remind?"
<integral> add a ; after the { of the first "block"
<integral> your code will then work.  perl only uses limited lookahead
           to decide
<statico> Weeeeeeeeeeird. Thanks!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.