sub bar {
while ($=shift) { print "parm: $\n"; }
}
bar(foo());
is printing bar, baf and bat leads to some important scope checks that many programmers are not aware of when getting data from the outside world, the problem was mentioned in a speech on 31C3 Congress and may be fixed by certain (foo())[0] whenever needed in the code.
the problem that:
sub foo { return "bar", "baf", "bat"; }
sub bar { while ($=shift) { print "parm: $\n"; } }
bar(foo());
is printing bar, baf and bat leads to some important scope checks that many programmers are not aware of when getting data from the outside world, the problem was mentioned in a speech on 31C3 Congress and may be fixed by certain (foo())[0] whenever needed in the code.