Need advice about which tool to choose?Ask the StackShare community!

MATLAB

1K
688
+ 1
37
Perl

3.4K
926
+ 1
574
Add tool

MATLAB vs Perl: What are the differences?

  1. Syntax: One key difference between MATLAB and Perl is their syntax. MATLAB is designed for numerical computations and uses a more concise and mathematical syntax, while Perl is a versatile scripting language with a more flexible and general-purpose syntax.
  2. Application: MATLAB is commonly used for mathematical modeling, simulation, and analysis, especially in engineering and scientific fields, whereas Perl is often used for text processing, system administration, web development, and network programming.
  3. Interactivity: MATLAB provides an interactive computing environment with a Command Window for immediate execution of commands and visualizing results, whereas Perl is typically used for writing scripts that run from start to finish without interactive communication.
  4. Built-in Functions: MATLAB comes with a large number of built-in functions and toolboxes tailored for mathematical calculations and data analysis, whereas Perl relies on external libraries and modules for specific functionalities.
  5. Data Structures: MATLAB offers matrix and array manipulation as core data structures, making it well-suited for linear algebra and signal processing tasks, while Perl provides various data structures like arrays, hashes, and scalars for more general data handling.
  6. Typing System: MATLAB is a dynamically typed language where variables are assigned data types during runtime, while Perl is a dynamically typed language with support for strong type checking to ensure data integrity.

In Summary, the key differences between MATLAB and Perl lie in their syntax, application, level of interactivity, built-in functions, data structures, and typing system.

Advice on MATLAB and Perl
Needs advice
on
GolangGolangPerlPerl
and
RustRust

I intend to use a programming language which I'll use as AWS runtime and write a script that will comb through tons of files in a directory and its subdirectories and search for simple text regular expressions and process and write the matches in a file as output. I have heard that Perl is good for regex based search but I also want the performance to be good as it will have to go through tons of files for IO. In this post: https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1, I see that Rust works well as AWS Lambda runtime with very good performance. Which one should I choose as my AWS lambda runtime for this problem? Golang is also an option as it is fast as per the above link.

See more
Replies (1)
Recommends

I used to work in a Perl shop and must admit that the language is very simple for tasks like these, but as you mentioned it's not fast at execution time. I'm now a Go programmer professionally but I taught myself the language while in college purely out of interest and eventually found my way to the job, not the other way around. I've recently been learning a little rust because of how much that language comes up in conversations around Go. I find the concept of the borrow checker nice but I have to admit I feel lost like I am in most flavors of new fancy framework js. That's not to say Rust is really anything like js, but the learning appears the same to me as someone who's convinced they could learn just about any programming language if it was necessary (over time I've seen procedural, OOP, declarative and functional stuff but never programming logic outside of the prolog code I wrote in school).

Go isn't made for your specific task at hand but it's a very easy language to pick up and it has good directory traversal standard library code and good regex (even though with time perl's has been optimized to be faster and I think it's written in C++) but more than anything Go is "cloud native" programming in that an awful lot of new microservice tech stacks are centered around it, docker and kubernetes are written in it, and there's a thriving community whose focus is generally web-first and performance-oriented. This means for your use case there might already be a large cohort of gophers that have asked the stackoverflow questions for you

I personally would push you towards the NYT Profiler for Perl before I would towards Rest, but that's because I know you wouldn't waste any time being able to get to the task at hand and then make it go faster, and I expect all but a few rustaceans would be able to do so with the same speed.

Whatever you pick I wish you the very best of luck!

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of MATLAB
Pros of Perl
  • 20
    Simulink
  • 5
    Model based software development
  • 5
    Functions, statements, plots, directory navigation easy
  • 3
    S-Functions
  • 2
    REPL
  • 1
    Simple variabel control
  • 1
    Solve invertible matrix
  • 72
    Lots of libraries
  • 66
    Open source
  • 61
    Text processing
  • 54
    Powerful
  • 49
    Unix-style
  • 47
    Regex
  • 37
    Stable
  • 32
    Concise syntax
  • 29
    Hackerish
  • 22
    Easy to use
  • 15
    Swiss army chainsaw
  • 13
    Code Less Do More
  • 12
    CPAN
  • 9
    Freedom
  • 8
    All purpose
  • 5
    Many ways to do it
  • 5
    Familiar
  • 5
    Readability
  • 5
    Community
  • 4
    Modular
  • 4
    Smart (does alot for you)
  • 4
    Object-Oriented
  • 3
    Postmodern
  • 3
    It's the best one-off task language
  • 2
    For a man
  • 2
    Good man pages
  • 1
    Auto case variables
  • 1
    Single Source Library (CPAN)
  • 1
    Multi-threaded support
  • 1
    Hashes
  • 1
    C-style
  • 1
    Multiparadigm

Sign up to add or upvote prosMake informed product decisions

Cons of MATLAB
Cons of Perl
  • 2
    Parameter-value pairs syntax to pass arguments clunky
  • 2
    Doesn't allow unpacking tuples/arguments lists with *
  • 2
    Does not support named function arguments
  • 4
    Messy $/@/% syntax
  • 3
    No exception handling
  • 2
    Bad OO support
  • 2
    "1;"
  • 2
    No OS threads
  • 1
    Variables are global by default
  • 1
    Copy-on-create for interpreter-based threads
  • 1
    Barewords
  • 1
    Errors/warnings are ignored by default

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is MATLAB?

Using MATLAB, you can analyze data, develop algorithms, and create models and applications. The language, tools, and built-in math functions enable you to explore multiple approaches and reach a solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java.

What is Perl?

Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

Need advice about which tool to choose?Ask the StackShare community!

What companies use MATLAB?
What companies use Perl?
See which teams inside your own company are using MATLAB or Perl.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with MATLAB?
What tools integrate with Perl?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

What are some alternatives to MATLAB and Perl?
R Language
R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible.
NumPy
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.
Octave
It is software featuring a high-level programming language, primarily intended for numerical computations. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB.
Tableau
Tableau can help anyone see and understand their data. Connect to almost any database, drag and drop to create visualizations, and share with a click.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
See all alternatives