Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 3292218ae8be3d2be9642ee26003af43 > files > 219

perl-Devel-Trepan-0.500.0-2.mga4.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";