in reply to Re: Why doesn't this work?
in thread Why doesn't this work?

I forgot the 'my' in the braces, but know the point you were making -- i.e. that's why it was in braces.

I wasn't trying to use slurp mode & $/=undef in the one example, -- was trying to recognize "\000" (NUL) as the line delimiter (in this case a list of NUL-terminated filenames) and use that to read the whole thing into an array and then seeing how many array members I had.

Replies are listed 'Best First'.
Re^3: Why doesn't this work?
by perl-diddler (Chaplain) on Apr 12, 2013 at 22:18 UTC
    Make that 'my' a 'local'... geez... trying to respond too fast. Just to be sure I checked my code and only find one place where I used slurp mode that wasn't in a 1-liner, and I used local there. Glad you reminded me -- as I'd started to get it in my head that braces or my were needed...

    Looks like most common usage for me is shell-1-liners where Shell can't deal with NUL terminated lines, so need perl to do that.