in reply to Re^2: Implicit assignment to $_
in thread Implicit assignment to $_

Really? That's a copy/paste from my terminal. Wish there was a way to post screenshots to PM.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re^4: Implicit assignment to $_
by tobyink (Canon) on Feb 26, 2013 at 20:21 UTC

    You probably ran Perl with -w then, because it's warnings that produces that error.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

      Confirmed (with 5.14.2):

      $ cat test.pl use strict; "Test A"or"Test B"; print; $ perl test.pl $ perl -w test.pl Use of uninitialized value $_ in print at test.pl line 3.