C
Chad
Give the following....
[cdalten@localhost oakland]$ more hello.pl
sub hello() {
print "hello \n";
}
hello();
I change the file permissions to read/write and then run the program..
[cdalten@localhost oakland]$ ls -al hello.pl
-rw------- 1 cdalten cdalten 48 Jul 12 15:11 hello.pl
[cdalten@localhost oakland]$ perl hello.pl
hello
[cdalten@localhost oakland]$
I'm assuming the perl interpreter reads in the hello.pl file. The
question is, how does it run hello(); if the actual function
definition is above the function itself. Does it just backtrack along
the text file and then re-read the actual function definition itself?
[cdalten@localhost oakland]$ more hello.pl
sub hello() {
print "hello \n";
}
hello();
I change the file permissions to read/write and then run the program..
[cdalten@localhost oakland]$ ls -al hello.pl
-rw------- 1 cdalten cdalten 48 Jul 12 15:11 hello.pl
[cdalten@localhost oakland]$ perl hello.pl
hello
[cdalten@localhost oakland]$
I'm assuming the perl interpreter reads in the hello.pl file. The
question is, how does it run hello(); if the actual function
definition is above the function itself. Does it just backtrack along
the text file and then re-read the actual function definition itself?