Help for this page
my $name = 'fred'; substr($name, 4) = 'dy'; # $name is now 'freddy' my $null = substr $name, 6, 2; # returns "" (no warning) my $oops = substr $name, 7; # returns undef, with warning substr($name, 7) = 'gap'; # raises an exception
$x = '1234'; for (substr($x,1,2)) { $_ = 'a'; print $x,"\n"; # prints 1a4 ... $x = '56789'; $_ = 'pq'; print $x,"\n"; # prints 5pq9 }
www.com | www.net | www.org
No recent polls found