- or download this
perl -nle '$t+=$_}{print$t'
- or download this
LINE: while(<>) {
perl -nle '$t+=$_}{print$t
}
- or download this
perl -wnE '$s+=$_}{say$s'
- or download this
Can't call method "say" without a package or object reference at -e li
+ne 1, <> line 2.
- or download this
perl -wnE '$s+=$_;END{say$s}'
- or download this
$ perl -MO=Deparse -wnE '$s+=$_}{say$s'
- or download this
BEGIN { $^W = 1; }
LINE: while (defined($_ = <ARGV>)) {
...
}
-e syntax OK
$