Perl during execution???


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl during execution???
# 1  
Old 05-20-2011
MySQL Perl during execution???

Hi All,

What happens when a Pelr script is executed.??(Jus like in C/C++ we have several stages like preprocessing,assembling,complining ,linkin',loadin'...)

So similiarly In Perl we have something like compile pahse and run phase. but what exactly happens during its exec and what all intermediate files will be created/linked/loaded ?????Smilie

A walkthrough on this will be much appreciated. Thanks!!!

# 2  
Old 05-20-2011
You've got something wrong here: preprocessing, assembling, compiling and linking are not part of the execution of any program, but necessary steps to create an executable file. Otherwise everyone would have to have the source code available at any time to run any program, including the daemons loaded when the system is booting.

Same with Perl scripts: when the interpreter is started, the complete script is loaded into memory, "compiled" (translated into byte-code), and then executed. No intermediary files necessary.

If you need a highly detailed explanation, I'd suggest taking a look at the Perl source itself.
# 3  
Old 05-20-2011
Sorry, for my English hereSmilie....... I also meant such stages are involved in creating an executable file only.

But if u take an C program ....it creates a file after assembling the code for compiler( which will involve lexical/synatx analyser).Hence intermediate files are very much required for a C program. like .asm,.obj,files.

So,I wanted to know wethaer PERL also has a similiar type of stages before creating an executable.
# 4  
Old 05-20-2011
That's not quite true. The GCC C/C++ compilers, for example, have the neat -pipe option, where no intermediate files are created, but the result of one step is piped to the next.

But that aside, with Perl, just as with Python, Shell, Ruby, TCL, ... basically any scripting language out there, there are no intermediate files. The whole file is read into memory, translated to byte code in memory, and executed from memory. Besides, no scripting language creates an executable (unless you supply very specific command line options and know what you're doing).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl execution commands

I don't know to debug the program todaylive.pl program. plz someone let me know what are the commands I need to know to debug the perl programs to find out the error on it. (3 Replies)
Discussion started by: ramkumar15
3 Replies

2. Shell Programming and Scripting

Execution problem unix commands in Perl CGI

I am trying to run SSH , mkdir and other unix commands using Perl CGI. But i am not able to Execute these commands. Please help me out !!!! SSH and mkdir is necessity for me. I will be thankful to you...!!!!! I am trying like: In perl CGI file i am writing like: @list = `ssh... (28 Replies)
Discussion started by: Navrattan Bansa
28 Replies

3. Programming

Perl script remote execution as another user

Hi gurus, I have a requirement where I need to remotely run a perl script as another user. Running the script locally as the required user is fine, however I need to su with the script due to filesystem permission issues. I do not want to update permissions on the remote server due to security... (5 Replies)
Discussion started by: melias
5 Replies

4. Shell Programming and Scripting

Perl execution debugger

If this is the wrong forum, move it. It seemed like the best. Does anyone know of a perl thing that does the same thing as bash -x except for perl? I know I can output the information I want at the right times by actually putting that in the code, but it's harder... (2 Replies)
Discussion started by: killer54291
2 Replies

5. Shell Programming and Scripting

Execution difference in perl scripts for windows / AIX

Hi, I have perl script abc.pl which runs perfectly fine on windows ( execution from cmd). Now i tried to execute the same perl module on the AIX server after defining the captureoutput.pm and other relevant changes. But its behaving very weirdly as a portion of the URL which is formed by... (3 Replies)
Discussion started by: slayer0611
3 Replies

6. Shell Programming and Scripting

Execution problem with perl

I got the below error when using the below code...it seem that perl interpret the "'" in the middle and therefore the pipe is not finished. perl -wle ' @a=`who| perl -wlane 'print \$F;' | sort -u` ; chomp @a ; print @a; ' the error message in cygwin is:- perl: No match. | sort... (12 Replies)
Discussion started by: ahmad.diab
12 Replies

7. Shell Programming and Scripting

Give input to a perl script while execution

Hi, I have a perl script which prints me the epoch value of a specific date and time given.Now I want to proceed to a next step ie i want to give the input at the time of execution. I have to initialise the date and time values in the script before executing it.But now i want to give the date... (3 Replies)
Discussion started by: jyothi_wipro
3 Replies

8. Shell Programming and Scripting

Shell Command execution through PERL

Hi Guys, I wish to execute some shell commands through PERL. Here is what I desire to do 1) I wish to find list of directories in current working location 2) Then go in each directory and execute few commands like a) rm -rf *.log (Shell command) b) coreBuilder -f cb_tests.tcl (Some... (6 Replies)
Discussion started by: hardik_snps
6 Replies

9. Shell Programming and Scripting

geting user input from php and using perl for execution

I am using festival speech synthesis system and I would like to allow user input in a browser. This will be taken by a php page which is then supposed to pass the input text to a perl script. The perl script should pass this text to the festival engine by executing a unix command. this in turn... (2 Replies)
Discussion started by: wairimus
2 Replies

10. Shell Programming and Scripting

SolarisCron job perl script execution error

Hi, I want to run a crontab job on solaris10.5. I have configured the crontab accordingly 10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt.However this does not work .Then I go to /var/mail/root and find an error in the output:... (4 Replies)
Discussion started by: sonu2die4
4 Replies
Login or Register to Ask a Question