Help for this page
my $C='((w)hite|(b)lack)'; ... white "princepawn" foo black "princepawn"
sub popstr { substr $_[0], -1, 1, '' } # or chop sub shiftstr { substr $_[0], 0, 1, '' } ... pushstr $string, $foo; # estint unshiftstr $string, $bar; # gestint print "$string\n";
sub popstr { $_[0] =~ s/(.)\z//s; $1 } sub shiftstr { $_[0] =~ s/^(.)//s; $1 } ... pushstr $string, $foo; # estint unshiftstr $string, $bar; # gestint print "$string\n";
2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$