FAQ 1.10 Can I do [task] in Perl?



This is an excerpt from the latest version perlfaq1.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

1.10: Can I do [task] in Perl?

Perl is flexible and extensible enough for you to use on virtually any
task, from one-line file-processing tasks to large, elaborate systems.
For many people, Perl serves as a great replacement for shell scripting.
For others, it serves as a convenient, high-level replacement for most
of what they'd program in low-level languages like C or C++. It's
ultimately up to you (and possibly your management) which tasks you'll
use Perl for and which you won't.

If you have a library that provides an API, you can make any component
of it available as just another Perl function or variable using a Perl
extension written in C or C++ and dynamically linked into your main perl
interpreter. You can also go the other direction, and write your main
program in C or C++, and then link in some Perl code on the fly, to
create a powerful application. See perlembed.

That said, there will always be small, focused, special-purpose
languages dedicated to a specific problem domain that are simply more
convenient for certain kinds of problems. Perl tries to be all things to
all people, but nothing special to anyone. Examples of specialized
languages that come to mind include prolog and matlab.



--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • FAQ 5.29 How can I read in an entire file all at once?
    ... Are you sure you want to read the entire file and store it in memory? ... you can virtually load the entire file into a string ... The customary Perl approach for processing all the lines in a file is to ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)
  • FAQ 5.29 How can I read in an entire file all at once?
    ... Are you sure you want to read the entire file and store it in memory? ... you can virtually load the entire file into a string ... The customary Perl approach for processing all the lines in a file is to ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)
  • FAQ 5.29 How can I read in an entire file all at once?
    ... Are you sure you want to read the entire file and store it in memory? ... you can virtually load the entire file into a string ... The customary Perl approach for processing all the lines in a file is to ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)
  • FAQ 5.29 How can I read in an entire file all at once?
    ... Are you sure you want to read the entire file and store it in memory? ... you can virtually load the entire file into a string ... The customary Perl approach for processing all the lines in a file is to ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)
  • FAQ 7.15 How can I pass/return a {Function, FileHandle, Array, Hash, Method, Regex}?
    ... See "Passing Regexes", later in perlfaq7, for information on passing ... func(\$some_scalar); ... As of Perl 5.6, you can represent filehandles with scalar variables ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)