http://qs321.pair.com?node_id=968550

floobit has asked for the wisdom of the Perl Monks concerning the following question:

This question has probably been posted before, but I have spent about 2 hours looking through the doc and searching this forum and found nothing. I apologize:

In linux, I am trying to strip the tty off a ps aux. Here is the regular expression I would use in sed. It works wonderfully:

s!.*pts/\([0-9][0-9]*\).*!\1!

When used in perl, it does not work. I have narrowed it down to the use of \( and \). When I remove these, the regex actually does something. How do I use the buffer functionality of sed in perl? Does anyone know a good online reference explaining the differences of perl's sed and canonical sed?