# file test # package main 4 >> print "Statement 1 at line 4\n"; ------------------------------------------------------------------------------ Statement 1 at line 4 5 >> print "Statement 2 at line 5$/"; ------------------------------------------------------------------------------ Statement 2 at line 5 6 >> print "Call to sub x returns ", &x(), " at line 6.\n"; ------------------------------------------------------------------------------ # -> main::x () called in LIST context 12 >> print "In sub x at line 12.\n"; # (main test 6) ------------------------------------------------------------------------------ In sub x at line 12. 13 >> return 13; # (main test 6) ------------------------------------------------------------------------------ Call to sub x returns 13 at line 6. 7 >> print "time array '@{[Foo::slt(1614293354)]}' at line 7$/"; ------------------------------------------------------------------------------ 7 >> print "time array '@{[Foo::slt(1614293354)]}' at line 7$/"; ------------------------------------------------------------------------------ # file Foo.pm # package Foo # -> Foo::slt (1614293354) called in LIST context 4 >> localtime(shift||time); # (main test 7) ------------------------------------------------------------------------------ time array '14 49 23 25 1 121 4 55 0' at line 7 # file test # package main 8 >> print "time scalar '".scalar(Foo::slt(1614293354))."' at line 8\n"; ------------------------------------------------------------------------------ # file Foo.pm # package Foo # -> Foo::slt (1614293354) called in SCALAR context 4 >> localtime(shift||time); # (main test 8) ------------------------------------------------------------------------------ time scalar 'Thu Feb 25 23:49:14 2021' at line 8 # file test # package main 10 >> exit 0; ------------------------------------------------------------------------------ # -> main::END () called in VOID context 15 >> END { print "end at line 15\n" } # (main test 10) ------------------------------------------------------------------------------ end at line 15 # file Foo.pm # package Foo # -> Foo::END () called in VOID context 6 >> END { print "bye...\n" } # (main test 10) ------------------------------------------------------------------------------ bye...