in reply to Re^2: map { ; ; ; } @array
in thread map { ; ; ; } @array

for is not an expression, so it shouldn't be suprising that it doesn't have a well-defined value. I think the document is a little vague, but people seem to be hung up on the sentence...
"The return value of the subroutine is the value of the last expression evaluated."
...which probably should be modified to something like...
"The return value of the subroutine is the value of the last syntatic expression."

Replies are listed 'Best First'.
Re^4: map { ; ; ; } @array
by Perl Mouse (Chaplain) on Oct 24, 2005 at 11:16 UTC
    for is not an expression
    No, but Perl does have a construct to turn any statement into an expression, and it's called do.
    @foo = map {do {1 for 1}} @bar;
    Perl --((8:>*