groups

Link to this snippet:


Download to Code Collector

language: Perl
licence: Other

Substring

options: send to code collectorview all nepahwin's snippets
my $s = "The black cat climbed the green tree";
my $color = substr $s, 4, 5; # black

my $name = 'fred';
substr($name, 4) = 'dy';