in reply to Re^2: How it works?
in thread How it works?
Implicit int-ing also works at run-time:
Dunno about the documentation.c:\@Work\Perl\monks>perl -wMstrict -le "my @ra = qw(e h l o); my ($i, $j, $k, $l) = (0.99876, 1.00123, 2.499999, 3.5); print $ra[$j], $ra[$i], $ra[$k], $ra[$k], $ra[$l]; " hello c:\@Work\Perl\monks>perl -wMstrict -MO=Deparse,-p -le "my @ra = qw(e h l o); my ($i, $j, $k, $l) = (0.99876, 1.00123, 2.499999, 3.5); print $ra[$j], $ra[$i], $ra[$k], $ra[$k], $ra[$l]; " BEGIN { $^W = 1; } BEGIN { $/ = "\n"; $\ = "\n"; } use strict 'refs'; (my(@ra) = ('e', 'h', 'l', 'o')); (my($i, $j, $k, $l) = (0.99876, 1.00123, 2.499999, 3.5)); print($ra[$j], $ra[$i], $ra[$k], $ra[$k], $ra[$l]); -e syntax OK
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How it works?
by kcott (Archbishop) on Jan 22, 2016 at 06:43 UTC |