While answering to [id://547098], I did a little experiment, i.e.
$ perl -wlne '$x=split'
but for some strange reason on the first try I used double quotes instead of single ones (I'm under *NIX). So it was just like s/$x// and thinking of it retrospectively I would have thought it to cause a syntax error. But it seems that assignement into nothing is valid:
$ perl -MO=Deparse -Mstrict -wlne '=split'
BEGIN { $^W = 1; }
BEGIN { $/ = "\n"; $\ = "\n"; }
LINE: use strict 'refs';
while (defined($_ = )) {
chomp $_;
}
-e syntax OK
it just silently evaporates... wouldn't it be the case to issue at least a warning instead? Or are there good reasons not too! Offhand I can't think of any incompatibility with wanted beahaviour...
perlmonks.org content © perlmonks.org and blazar, rhesa
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03