in reply to Placement of Subs

But I have heard here and other places online that it is better to place it on top.

It is. Placing them at the top avoids sharing of ALL lexically scobed variables in the file scope ("unintended globals"). It also allows you to not write parens (which isn't really a problem if you like parens anyway).

Have a look at this recent meditation: where do you put your subs.

Especially demerphq's posts. (and mine of course *grin*)

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk

Replies are listed 'Best First'.
Re: Re: Subs
by venimfrogtongue (Novice) on Mar 26, 2002 at 14:26 UTC
    Thanks millions for all your help, everyone! One thing I have noticed, seeming this is my first attempt to learn any programming language, is there is never just one way to do things. Everyone has their own way to set things up, kinda gets confusing as a newbie when one person tells you to do this while others say now :) Gotta love perl though, too addicting. Thanks everyone!