- or download this
for('a','anyone','cancel','declare','perlmonks'){$i=()=/e/g;print"$_:
+$i\n"if(/a/);}
- or download this
/a/&&print"$_: ".y/e//.$/for'a','anyone','cancel','declare','perlmonks
+'
- or download this
a: 0
anyone: 1
cancel: 1
declare: 2
- or download this
a
anyone
cancel
declare
perlmonks
- or download this
perl -lne"/a/&&print$_.': '.y/e//" t1.txt
- or download this
perl -lnE"/a/&&say$_.': '.y/e//" t1.txt