Questions tagged [perl]

Perl is a portable general-purpose dynamic programming language. It is used in a diverse variety of domains: system management scripting, text processing, web content management, Biology calculations, and others. It has a rich library of free reusable modules - the CPAN and a vibrant community of users and developers.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
84 views

Choosing between perl and python for my application [closed]

I am working for a small electronics company and I was assigned a task of re-inventing and re-writing the software for our product delivery flow, which gathers design components, verifies them, and ...
user avatar
  • 21
0 votes
0 answers
41 views

Packaging for distribution: include CI config and other files the end user doesn't need in the package?

(Disclaimers: I have checked on Google and this site. I have read this answer, which is the only related one I could find here. Additionally, that answer is from 2017, and I wonder if things have ...
user avatar
  • 485
0 votes
1 answer
337 views

Pcregrep vs Perl vs Python for bash scripting when needing advanced regex features [closed]

I've lately been using pcregrep to do Perl-style group matching when doing my bash scripts. The problem with pcregrep is that it's not readily available on Linux machines in general. An alternative ...
user avatar
17 votes
7 answers
4k views

When should I use Perl's DBIx::Class?

DBIx::Class is a popular Perl interface to any database that you can connect to through DBI. There is good documentation for its technical details, but scant information about its proper use (...
user avatar
  • 1,962
0 votes
1 answer
180 views

How can I handle errors in functions [closed]

I'm programming a web app using Perl and Dancer. The logic is not trivial and I want to separate the web page logic (inside Dancer routes) from the business logic that reads and writes from the ...
user avatar
8 votes
2 answers
312 views

Is the Perl default variable like an FP monad?

I have been getting my head around monads in functional programming and seem to see some commonality between Perl's default variable $_ and FP monads. Is this true? Are there similarities, if not ...
user avatar
1 vote
2 answers
2k views

Incrementing Strings in PHP (and Perl)

PHP allows you to increment strings. Why? Let's jump ahead a bit. Take the following code: $string = '9ZzZ'; echo ++$string; // 10AaA From a purist point of view this may seem like nonsense, ...
user avatar
  • 233
42 votes
2 answers
47k views

PHP: when to use arrays, and when to use objects for mostly-data-storing code constructs?

PHP is a mixed paradigm language, allowing to use and return non-object data types, such as arrays. I pose a question to try to clarify some guidelines for selection of arrays vs objects when deciding ...
user avatar
  • 8,031
1 vote
2 answers
100 views

Should you ever mix scalar and list contexts anyway?

I have decided to learn Perl as my next language and I am currently reading about the scalar and list contexts, although this question is not specifically Perl-related, I will just put it in a Perl ...
user avatar
1 vote
3 answers
2k views

Is Perl used for web development? [closed]

I am a web developer. I have been using php for many years and I also know lots of other programming languages so I wanted to try making websites using them. I know Perl and want to make a website ...
user avatar
3 votes
1 answer
144 views

What is the origin of the phrase "extirpated as a potential munition"

I recently came across this statement in the Perl documentation: extirpated as a potential munition derived from the sentence: "Creates a digest string exactly like the crypt(3) function in the C ...
user avatar
  • 141
13 votes
5 answers
17k views

Should Perl scripts really have no extension?

I just began reading O'Reilly's Learning Perl, 6th Edition and was surprised when I came across this excerpt. #!/usr/bin/perl print "Hello, world!\n"; Let’s imagine that you’ve typed that into ...
user avatar
  • 483
2 votes
1 answer
147 views

How can I run a script/subroutine on a Web Server and have that subroutine remain private (eg. Key Generator)?

My Problem: I have been tasked with re-implementing a software key generator routine on an external web server running cPanel v.11.44.1.18. Currently, the key generator is implemented using a ...
user avatar
0 votes
1 answer
565 views

In MVC, why can't a model create a view?

I have a web application written in Perl with a controller, some "views" and some "Models". Each "Model" is corresponding to one "View". The controller (one file) creates an Model object ...
user avatar
1 vote
4 answers
314 views

Designs for outputting to a spreadsheet

I'm working on a project where we are tasked to gather and output various data to a spreadsheet. We are having tons of problems with the file that holds the code to write the spreadsheet. The cell ...
user avatar
3 votes
0 answers
1k views

Explanation java/web (tomcat/coyote/JSP/Servlet etc..) in 'Perl-world' terms

Analyzed one web-server. for the http request I got: apache 2.2... what redirects to https, and for https got apache-coyote 1.1. and the server runs XWiki java app. Trying to understand how it is ...
user avatar
  • 276
1 vote
1 answer
163 views

Simple dependency handling for objects (perl)

I am a bit stuck with a design of a project, where many objects has to have access to the same piece of information. It could be some data, to construct a global-like object for themselves or the ...
user avatar
  • 113
3 votes
1 answer
155 views

What design route should I take?

So I've taken on a project at work that I'm having a hard time attacking, and I'd love some feedback and suggestions. I work for an online retail store where we have an old, +7k-line script that we ...
user avatar
0 votes
1 answer
859 views

Why Perl is appropriate language for CGI? [closed]

I heard many people around still saying Perl is great language for CGI. But i think it is not as much as popular as now growing languages such as Python, Ruby. Is there any solid reason for Perl ...
user avatar
-1 votes
1 answer
257 views

Building a regex builder [closed]

I am a beginner in programming in general and web development in particular. I am especially bad at regular expressions. Recently I was involved in building a couple of cPanel plugins(Perl-CGI) and ...
user avatar
  • 119
4 votes
1 answer
475 views

Discovering functionality from parallel class hierarchy

I have an abstract syntax tree which I want to compile down to different representations. I am now struggling to arrange the classes in a way that new representations can be added easily. The easiest ...
user avatar
  • 124k
1 vote
2 answers
1k views

Languages implemented in Python?

AFAIK, Scala and Clojure are implemented in Java and Java is implemented in C. I suppose that many or most languages are implemented in C, for instance Perl, Python and SQL. I don't know much about ...
user avatar
2 votes
1 answer
787 views

Checking for cross-site scripting vulnerabilities in Perl web applications

I'm putting together some notes for a dev team on how to write secure Perl code - especially taking into account the current OWASP top 10 web application vulnerabilities. For cross-site scripting I've ...
user avatar
0 votes
2 answers
1k views

Is Perl outdated for CGI and FCGI? [closed]

When we did web development in 1996 it was CGI, FCGI and Perl on the backend. Now why is Perl not that popular anymore and instead we use Java, Python, Go, PHP, C# and everything but Perl? To me it ...
user avatar
3 votes
2 answers
2k views

C Equivalent of Perl Unpack & Pack

I have some perl code that uses pack and unpack to transform the data in a way that I don't understand. $unpacked_data = pack('b*', join('', unpack('(b7)*', $packed_data))) Where $packed_data = a ...
user avatar
  • 133
3 votes
3 answers
145 views

Perform operations in the entry-script, or create a class which just instantiates and calls methods?

I'm building a perl application which does the following operations: Copy a bunch of files (class fileFetcher ) Parse each file (class fileParser) Store some data from each file in a database (class ...
user avatar
9 votes
4 answers
895 views

Programming style in Perl

I work in Java so basically I use OOP paradigm during coding. I am about to start working in Perl and I was wondering what is the paradigm that Perl developers follow. In wiki it mentions that it ...
user avatar
  • 1,834
1 vote
1 answer
928 views

Task Scheduler shared hosting

I am using a shared host that which doesn't support CRON/TaskScheduler (it is a windows Godaddy server). I need to search on email server for new emails on each 1 hour, I have the script on PHP. Can ...
user avatar
  • 169
9 votes
4 answers
889 views

Is Non-Deterministic Resource-Management a Leaky Abstraction?

From what I can see, there are two pervasive forms of resource-management: deterministic destruction and explicit. Examples of the former would be C++ destructors and smart pointers or Perl's DESTROY ...
user avatar
2 votes
1 answer
114 views

is it possible to monitor more than one stream simultanously?

E.g. - $stream1 is the STDOUT of a child process and $stream2 is the STDERR of the same child process - $stream1 is one child process and $stream2 is another child process Is there a possiblility in ...
user avatar
  • 73
3 votes
2 answers
326 views

Is it better to use $filehandler or FILEHANDLER?

It seems like FILEHANDLER is more commonly used as a handler naming convention than $filehandler. But it can give a bareword error if one forgets to use *FILEHANDLER in some constructions. What are ...
user avatar
  • 73
28 votes
3 answers
34k views

How does the GPL static vs. dynamic linking rule apply to interpreted languages?

In my understanding, the GPL prohibits static linking from non-GPL code to GPL code, but permits dynamic linking from non-GPL code to GPL code. So which is it when the code in question is not linked ...
user avatar
  • 491
3 votes
3 answers
224 views

conventions for friend methods in Perl

Perl doesn't support a friend relationship between objects, nor does it support private or protected methods. What is usually done for private methods is to prefix the name with an underscore. I ...
user avatar
2 votes
1 answer
244 views

What is a "template" in Perl?

I can find all sorts of weird information about templates in Perl, but nothing about what they actually are. Are they generic types like in C++? Is it a class-like structure? Or maybe something ...
user avatar
  • 473
0 votes
1 answer
510 views

Converting data-structure in Perl [closed]

A function produces this hash of arrays: 'KEYNAME1' => ARRAY(0x1edeeb0) 0 'val11' 1 'val12' 2 'val13' 'KEYNAME2' => ARRAY(0x1efacb8) 0 'val21' 1 'val22' 2 'val23' ...
user avatar
  • 241
3 votes
2 answers
5k views

Arrow => in Perl

What does the => mean in Perl? my $CreateArray = [ objectClass => [ "top", "person", "organizationalPerson", "inetOrgPerson" ], cn => "Jane User", uid => "0000001", sn => "User", mail =...
user avatar
  • 241
2 votes
1 answer
3k views

UML representation of specific factory pattern

I have to create an UML class diagram from the following example code (Perl). I don't think that the standard factory pattern match in my case or I don't understand it correctly. I don't have ...
user avatar
  • 215
1 vote
4 answers
3k views

Is it bad to learn multiple programming languages? [closed]

I started learning PHP and I was able to get myself familiar with it. Now, I want to explore other programming languages like PERL so that I can compare it myself to PHP. Will I be confused to learn ...
user avatar
6 votes
3 answers
24k views

Scripting language for filling out web form

I have a job as an intern at a technology company, I was given the unfortunate job of performing some data entry into our web management system. The information entered into the web form is stored in ...
user avatar
  • 169
10 votes
5 answers
6k views

Improving performance for grepping over a huge file

I have FILE_A which has over 300,000 lines and FILE_B which has over 30 million lines. I created a Bash script that greps each line in FILE_A over in FILE_B and writes the result of the grep to a new ...
user avatar
1 vote
2 answers
262 views

Queuing RPC calls

I'm designing a system which listens to JSON RPC calls from clients, piles them up inside a list, and if the list gets full it will store them in a DB and keep receiving calls. My original plan is to ...
user avatar
  • 413
3 votes
1 answer
437 views

Alternative to Perl's POD Documentation in Other Languages?

Perl has this really cool documentation method that makes documenting really easy. It's called POD (Plain Old Documentation). Here is an example: =head1 NAME Example::Module - an example =head1 ...
user avatar
  • 5,686
4 votes
1 answer
202 views

What conventions or frameworks exist for MVVM in Perl?

We're using Catalyst to render lots of webforms in what will become a large application. I don't like the way all the form data is confusingly into a big hash in the Controller, before being passed to ...
user avatar
14 votes
3 answers
10k views

What are the similarities between Perl and Java? [closed]

I have my mind set that I'm learning Java as my second language (I am a Perl developer). But just from reading a little of the online tutorials, I really can't find any similarities between the two. ...
user avatar
  • 5,686
22 votes
12 answers
10k views

How to write a command interpreter/parser?

Problem: Run commands in the form of a string. command example: /user/files/ list all; equivalent to: /user/files/ ls -la; another one: post tw fb "HOW DO YOU STOP THE TICKLE MONSTER?;" equivalent ...
user avatar
  • 413
11 votes
12 answers
3k views

As a young developer, should I be worried about having to use "out-of-style" tech at work? [closed]

I'm a recent college graduate (last May!). While I was still in school, I wanted to make sure that I had a job before I graduated, and very early (probably too early) in my job search I settled on one ...
user avatar
  • 127
18 votes
2 answers
5k views

Why is Perl 5's smart-match operator considered broken? [closed]

I've seen a number of comments across the web Perl's smart-match operator is broken. I know it originally was part of Perl 6, then was implemented in Perl 5.10 off of an old version of the spec, and ...
user avatar
5 votes
5 answers
2k views

increasing productivity - mastering a language vs. selecting efficient tools

I'm looking for advice from experienced developers on this question. In my work there's a need for a lot of one-off code. It's tempting to just dip into the right python/perl library calls to do ...
user avatar
  • 150
77 votes
19 answers
206k views

Is Perl still a useful, viable language? [closed]

I know it may have been asked before, but here goes nothing... Is Perl still something that would be considered useful? If someone was a new programmer (either completely new to programming or just a ...
8 votes
3 answers
3k views

What does a company typically expect from a Perl developer? [closed]

Are there any common expectations from perspective employers when they hire a Perl developer? For a student who likes Perl and Linux and would like to get a job as Perl developer, what would you ...
user avatar