> 
> 
> I'm new to PERL and am trying to learn by reading some PERL programs.
> 

Perl or perl, never PERL. perldoc -q '"Perl"'

Sometimes that is good, sometimes bad depending on who wrote the Perl
you are reading, it is one way to pick up very bad habits.  Does the
code you are reading have:

use strict;
use warnings;

At the top?  If not you may be better off walking away slowly and then
checking out a book (see suggestion below) or one of the free online
resources first, then come back to the code.  http://learn.perl.org

> My question is this - does PERL execute sequentially and "skip around"
> embedded subroutines or
> Does it execute them inline?

It skips them as they are definitions....

> 
> For example, if the  program has the following set of code lines
> 
> Line1
> Line2
> Line3
> Sub1
> Subcode1
> Subcode2
> Endsub1
> Line4
> Line5
> Line6 calls sub1
> Line7
> 
> 
> Does the execution sequence go like this:
> 
> Line1, line2, line3 line 4 line5, line6, sub1, subcode1, subcode2,
> endsub1 line7
> 

Correct (if I am understanding your 'sub1' correctly).

> Or does it go like this:
> 
> Line1, Line2, Line3, Sub1, Subcode1, Subcode2, Endsub1, Line4, Line5,
> Line6, Sub1, Subcode1, Subcode2, Endsub1,  Line7
> 
> Thanks.
> 

You may want to look at,

perldoc perl

and review some of the basics. An excellent resource is also Learning
Perl from O'Reilly and will get you all of the basics you will need and
give you familarity with how to do things in a Perlish way.

Good luck and welcome,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to