Can someone explain why the following:

echo alphabet | perl -e '$_=<STDIN>; if (m/pha/){print $PREMATCH, "\n"}'

yields "" instead of "al", as I expected?

Jonathan

Reply via email to