in reply to Re: using a subroutine
in thread using a subroutine

Why not just place your subs whereever you like, call them from whereever you like without & and with (), and not use forward declarations either? What am I missing? Perl isn't C. This seems to work for me:
#!/usr/bin/perl use strict; use warnings; aaa("Hello world"); sub aaa { my $arg = shift; my $quit = shift; print("I am aaa, arg = $arg\n"); exit 0 if ($quit); bbb("hello bbb"); } sub bbb { my $arg = shift; print("I am bbb, arg = $arg\n"); ccc("hello ccc"); } sub ccc { my $arg = shift; print("I am ccc, arg = $arg\n"); aaa("hello aaa", 42); } __END__