Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 75740eac77d8f60a2e7829308f35d563 > files > 25

perl-Devel-Trepan-1.0.0-2.mga7.noarch.rpm

#!/usr/bin/perl
# From Chris Marshall perl #116358
#
# Illustrate lvalue sub debug problem
# The n command steps into the lvalue sub
#

my $data = '';

sub lslice :lvalue {
    my ($arg1, $val1) = @_;
    # print ".. in lslice now\n";
    # print ".. $arg1 + $val1 = ", $arg1+$val1, "\n";
    $data;
}

my $x = "Start test, \$data=$data\n";
lslice(3,5) = 4;
print "Stop  test, \$data=$data\n";