in reply to cut of first char of a string
my $s = "123456789"; $s =~ s/.// [download]
This doesn't do 'the right thing' for strings starting with a newline (which admittedly is a border case):
perl -MData::Dumper -e "$foo=qq(\nHello);$foo =~ s/.//; print Dumper \ +$foo" [download]
Adding the /s flag makes dot match newline too:
perl -MData::Dumper -e "$foo=qq(\nHello);$foo =~ s/.//s; print Dumper +\$foo" [download]