#!\usr\bin\perl -w for($_="head";s/(.)//;){ print"now head is $_.\n"; } #!\usr\bin\perl -w for($_="head";s/.//;){ print"now head is $_.\n"; }
who would like to tell me why the two can come to the same result when run them?
thanks
20041103 Janitored by Corion: Added formatting
2004-11-04 Edited by Arunbear: Changed title from 'cycle', as per Monastery guidelines
In reply to Unnecessary use of capturing in regex? by biofeng918
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |