Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
8 votes
1 answer
365 views

Parse data from Input file and print results

I have written a script which does parsing to the input file and take out some values from them with respect to the node and print the data accordingly. Below is my script, and it works as expected: <...
vkk05's user avatar
  • 183
12 votes
4 answers
3k views

Simple C transpiler

I wrote a simple transpiler (that may be a bit of a stretch) in perl to cut down on some boiler plate code. I'm very new to perl, this being maybe my third ever project in it. My main question would ...
Shipof123's user avatar
  • 353
6 votes
1 answer
146 views

Extract strings from nested array in Perl

Extract the strings from nested arrays in Perl. It prints: a, b, c, d, E ...
Miroslav Popov's user avatar
9 votes
2 answers
3k views

Count line of code for a JavaScript project

Here is my bash script that I just wrote to count line of code for JavaScript project. It will list number of: Comment lines Blank lines All lines Here is my script: ...
Chau Giang's user avatar
5 votes
2 answers
129 views

Assigning several variables from request URL using regexes

I refactored some of my code: Summary: This implementation works with PSGI/Plack. It gets the URL from $env->{PATH_INFO} and assigns a different variable ...
The nothing's user avatar
5 votes
2 answers
140 views

Python2 to Python3 print fixer in Perl

Sometimes, I'm reviewing old questions written in Python2, with no parentheses around print statements. Or I'm changing one of my older codes, also without ...
Ludisposed's user avatar
  • 11.8k
4 votes
2 answers
417 views

Matching Fasta file header and section of sequence, printing each header only once

I have a Fasta file which I am opening and reading. I need to search for certain regions of the DNA sequence and, for each match found, print the sequence header followed by all matches within that ...
Sammi's user avatar
  • 41
5 votes
2 answers
127 views

Extracting parts of filenames from an array

I am very new to perl. So far I love it, my new favorite interpreted language. I am quickly learning that perl has MANY 'tricks' to it. The following code extracts file names out of one array and into ...
Dellowar's user avatar
  • 267
7 votes
2 answers
414 views

Finding the first non-repeated character in a string

Given a string, find the first non-repeated character in it. E.g., "yellow" should return "y" There are several solutions for this in other languages, but I haven't seen one ...
yuri's user avatar
  • 4,538
4 votes
1 answer
113 views

Perl module validate quoted string literal, test with Test::LectroTest

I guess for some motivation: I ripped this out of a larger library I'm half-working on to parse S-expressions and cleaned it up a bit. I'm trying to write a simple function that tests whether a ...
Greg Nisbet's user avatar
7 votes
1 answer
112 views

Perl script to match case law references

I am very new to Perl and decided to work on a simple script that could solve a problem I encounter in my day to day work. The purpose of the code that follows is to search over a body of text and ...
DanielH's user avatar
  • 177
6 votes
1 answer
104 views

Extracting Linux configuration information using Bash and Perl

For few days I'm thinking about making my code faster and using less CPU. This code is a statusbar that runs in a loop. I'm asking because there's a lot of perl and I'm wondering if it could be done ...
Jaroszewski Piotr's user avatar
6 votes
2 answers
320 views

Terminal Chat Room

Summary I have written a pair of Perl scripts that form a UDP chat room allowing users to send messages over the internet with RSA encryption, making the messages imune to MITM attacks. The scripts ...
jess's user avatar
  • 1,378
7 votes
1 answer
764 views

Network chat in Perl

I have written a network chat program as my first major project in Perl. It makes simple use of REGEXP's, modules, sockets, command-line option parsing, and forking and uses these features to produce ...
jess's user avatar
  • 1,378
4 votes
1 answer
89 views

Deleting most recent files by parsing filename

I have hundreds of .mp3 files in a single directory of the same naming format, title_YYYY-MM-DD.mp3, with maybe 30 different ...
BryanK's user avatar
  • 143

15 30 50 per page