March 2001
Intermediate to advanced
288 pages
4h 56m
English
You may be accustomed to using s//A New Beginning/ to insert some text at the beginning of the current line in some applications. In Perl (as in sed), the empty regular expression doesn't match a zero-length substring; it matches whatever the previous regular expression matched. If there isn't a previous regular expression, Perl and sed part company: Perl treats it as matching the beginning of the string; sed says it's an error.