Skip to content

Instantly share code, notes, and snippets.

@robinhouston
Created February 5, 2012 16:22
Show Gist options
  • Save robinhouston/1746349 to your computer and use it in GitHub Desktop.
Save robinhouston/1746349 to your computer and use it in GitHub Desktop.
lvalue subroutine behaviour changes
# In days of yore, this would print ONCE UPON A TIME.
# In bleadperl, it prints BUT NOWADAYS
#
# Can anyone point me to what has changed?
use strict; use feature 'say';
my $x = "ONCE UPON A TIME";
sub foo :lvalue { $x; }
my $r = \(scalar foo());
$$r = "BUT NOWADAYS";
say $x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment