Stuart White wrote: > > Hello all, Hello,
> I seem to be stuck on subroutines. I've read the Perl > for Beginners Wrox chapter on them, and I'm still a > bit lost. The first thing that you should read is the documentation supplied with Perl. The document describing subroutines is perlsub.pod. perldoc perlsub > My problem is passing a scalar to a > subroutine, doing calculations therein, and then > returning a value; or basically, subroutines in > general. Subs in Perl are pretty simple. All arguments to the sub are flattened to a list and are available inside the sub in the @_ array but be careful because modifying the contents of @_ will modify the contents of the original variables. All return values are also flattened to a list when the sub ends. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]