From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

#!perl -w
use Test qw(plan ok);
plan tests => 4;
$a = "abc";
ok(SvCUR($a), 3);
ok(SvLEN($a), 4);
SvCUR_set($a, 1);
ok($a, "a");
SvCUR_set($a, 4);
ok($a, "abc\0");