perlquestion
rsFalse
Hi,
I was expecting same answer ("6|7\n") from all code lines below. Why they are different?
<code>while(<>){
@_=/./g; print "@-|@+\n";
()=/./g; print "@-|@+\n";
/./g; print "@-|@+\n";
(/./g); print "@-|@+\n";
()==/./g; print "@-|@+\n";
$_[/./g]; print "@-|@+\n";
/./g; print "@LAST_MATCH_START|@LAST_MATCH_END\n";
}</code>
<code>
# INPUT: 1234567
# OUTPUT:
6|7
6|7
0|1
1|2
2|3
3|4
|</code>