Explicitly invoking the Perl compiler/interpreter
(note that >>> is prompt only)
>>>perl program.pl
Many command line options are available here eg.
-w print all warnings
-c check but do not execute
-d run under debugger control
Implicitly invoking the Perl compiler/interpreter
It is system specific. e.g. Unix
#!/usr/bin/perl
print "Please enter your name: ";
This is popular shebang notation. Also you can do following:
#!/usr/bin/perl -w
for warning check etc like we do with command line options.
Showing posts with label starting language. Show all posts
Showing posts with label starting language. Show all posts
Monday, September 13, 2010
Running a perl program
Explicitly invoking the Perl compiler/interpreter
(note that >>> is prompt only)
>>>perl program.pl
Many command line options are available here eg.
-w print all warnings
-c check but do not execute
-d run under debugger control
Implicitly invoking the Perl compiler/interpreter
It is system specific. e.g. Unix
#!/usr/bin/perl
print "Please enter your name: ";
One can also use -w etc options here also
Eg. #!/usr/bin/perl -w
Other thing is changed the permission of perl file by chmod command to executable and run it as normal executable file.
(note that >>> is prompt only)
>>>perl program.pl
Many command line options are available here eg.
-w print all warnings
-c check but do not execute
-d run under debugger control
Implicitly invoking the Perl compiler/interpreter
It is system specific. e.g. Unix
#!/usr/bin/perl
print "Please enter your name: ";
One can also use -w etc options here also
Eg. #!/usr/bin/perl -w
Other thing is changed the permission of perl file by chmod command to executable and run it as normal executable file.
Subscribe to:
Posts (Atom)