Stories
Slash Boxes
Comments
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)

statico
  ian.langworthNO@SPAMgmail.com
http://langworth.com/
AOL IM: eisforian (Add Buddy, Send Message)

PAUSE-ID: IAN [cpan.org]

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

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 { "$_.foo\n", "$_\_bar.baz\n" } map { quux($_) }
           @$quuuuux;
<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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.