in reply to Re: Capture not working
in thread Capture not working

I beg to differ ...uh agree with the OP

>perl -wle"while ('a'=~/(.)/, 0) {} print(qq{Found $1})" Use of uninitialized value in concatenation (.) or string at -e line 1 +. Found

Turns out $x .= <> doesn't even cause a warning at EOF?!

>perl -we"our $x; $x .= <>" <nul >

Replies are listed 'Best First'.
Re^3: Capture not working
by Anonymous Monk on Jan 08, 2009 at 14:03 UTC

    Thank you, that's very helpful. I didn't know you can assign the results of a pattern operation to a list like this.

    I don't quite see in how far the EOF test was buggy though, since the data can neither contain blank lines nor lines containing nothing but a "0"...

      I don't quite understand the last paragraph. Are you asking why the EOF test was buggy? No matter how many undef you add to $statement, it will never become false once it's true, so the die won't be executed.