Click here to Skip to main content
15,886,091 members
Everything / Programming Languages / Perl

Perl

Perl

Great Reads

by Omar Al Zabir
Protect ASP.NET and WCF from various brute force and Denial of Service attacks and speed up response time using nginx.
by Oscar-Tark
If you are looking into white hat hacking, it's good to know old school tactics used for overflows.
by Oscar-Tark
In this article, we will be looking at a more advanced version of a buffer overflow attack.
by anshulskywalker
Understanding of Example Based Machine Translation (EBMT) system and how to create your own using exisiting tools

Latest Articles

by Paul Aurelian Gagniuc
This article shows how to mix two signals into a third, in variable proportions.
by Oscar-Tark
In this article, we will be looking at a more advanced version of a buffer overflow attack.
by Oscar-Tark
A basic formatted string exploit shows you how small errors in programming with the printf function can be a lethal weapon for hackers looking to compromise a system.
by Shameel
Part 2 of this multi-part article series compares SQL Server and PostgreSQL article, database structure, language differences, data type mappings, functions and operators and other important considerations for migration..

All Articles

Sort by Title

Perl 

17 Nov 2010 by sigurko
Hello all,I'm looking for a C/C++/C#/Perl implementation of the solution to the "8 queens" problem via a "Hill Climbing" algorithm.I found tons of theoretical explanations on that specific issue on the web but not a single code example.A moment before I sit down to code this piece of...
17 Nov 2010 by Manfred Rudolf Bihy
Hi Matthew,this kind of smells like homework, but I'll give you a couple of hints anyhow.I hope you understand the 8 queens problem so I wont go into that."Hill Climbing" algorithms start at a randomly selected start point, andtry to do small gradual optimizations trying to obtain a...
19 Jun 2015 by ilostmyid2
in perl under windows (activeperl) when i want to check whether a path is a file or directory and the path includes non-western characters, neither -f nor -d return true on a file which really exists.what can i do?
19 Jun 2015 by Jochen Arndt
Use the testL function from the Win32::LongPath[^] CPAN module I suggested in my answer to your last question:die "$file is not a regular file" if testL ('f', $file);
18 Jun 2015 by ilostmyid2
in Windows, i get "Filename too long" when the perl script tries to 'opendir' the directory with long path. i use activeperl to run the perl script.how can i resolve it?
19 Jun 2015 by Jochen Arndt
Use Win32-LongPath[^]:Quote:Although Perl natively supports functions that can access files in Windows these functions fail for Unicode or long file paths (i.e. greater than the Windows MAX_PATH value which is about 255 characters). Win32::LongPath overcomes these limitations by using Windows...
14 Dec 2017 by ilostmyid2
I use this site to convert sequence of bytes like this: Рабыни into proper character sequences like this: Рабыни It seems that the site decodes the UTF8 sequences into their original characters. For some reason, some of my files names are corrupted and I need to convert them back to...
11 Dec 2013 by kesavahariprasad
Hi,Please provide the code to find the users network speed.and save in database.Thanks,T.Kesavahariprasad.
11 Dec 2013 by OriginalGriff
It doesn't quite work like that.We do not do your work for you.If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys
11 Dec 2013 by OriginalGriff
It doesn't quite work like that.We do not do your work for you.If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys
16 Feb 2014 by OriginalGriff
It doesn't quite work like that.We do not do your work for you.If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys
25 Feb 2013 by Creepystranger
hi all curretly in my project everyday I need to open a particular URL(which is kind of like app view in Control-m) and search for some jobs and send its status in a mail and believe me its very boring and i want to automate it.although m not very versed with scripting in perl and python i...
6 Sep 2000 by Milan Gardian
Notes on updating your WTL installation
27 May 2021 by Oscar-Tark
In this article, we will be looking at a more advanced version of a buffer overflow attack.
12 Apr 2006 by Michael Vasquez
This article includes a simple address book application in Perl.
16 Mar 2011 by Paul Lessard, M.Sc.
We propose a way to secure C# programs by emulating Taint checking
25 Nov 2020 by OriginalGriff
You're running late - the rest of your class was trying to get us to do this homework last week ... But I'll tell you what we told them: Quote: We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it...
25 Nov 2020 by Patrice T
Posting your homework is not a question. You show no attempt to solve the problem yourself, you have no question, your main effort is pasting the requirement, you just want us to do your HomeWork. HomeWork problems are simplified versions of the...
7 Oct 2004 by Toby Jacob Rhodes
10 Aug 2014 by dennis2704
for ($i=0;$i
10 Aug 2014 by Groulien
Inside your 'for' loop:if (i % 100 == 0) { $nr += 1;}
10 Aug 2014 by Andreas Gieriet
How about this:$nr2++ unless $i%100;CheersAndi
13 Dec 2011 by Brady Kelly
I have a brief to customise a WordPress installation to be used to give training, i.e. to host training content, simple tests, student progress records, and student progress reports.I think a custom post type would cover the training content pages quite well, but I will need to 'template'...
17 Mar 2013 by ali_crash
Hi guysI am working on a project that my professor asked.I need an algoritm to create a fsa for stringsexample:takes this sentences: "ali goes to school"and create a graph like thisSTART->ali->goes->to->school->ENDthe graphical part of drawing a chart like this is not...
17 Mar 2013 by Matthew Faithfull
Right now you probably know more about this than most people here as you're in the middle of it so you may get a better response by having a go at it and asking more specific questions when you get stuck. It's been a very long time since I looked at anything like this so don't take my word for...
17 Mar 2013 by Abhinav S
Tryhttp://fsa.sourceforge.net/[^]http://www.eti.pg.gda.pl/katedry/kiw/pracownicy/Jan.Daciuk/personal/minim.html[^]
16 Mar 2013 by SR N0389
Can anyone tell me how to register for a site using Perl.?I have one web site, i want to automate registrations.This website has captcha on the registration form. This captcha will store in one cookie, and i know the cookie name.What i wanted to do is, I want to send all the form data...
29 Feb 2020 by Oscar-Tark
A basic formatted string exploit shows you how small errors in programming with the printf function can be a lethal weapon for hackers looking to compromise a system.
30 Aug 2019 by Oscar-Tark
If you are looking into white hat hacking, it's good to know old school tactics used for overflows.
13 Feb 2015 by Mescalina
HiI need to develop a web accessible server application able to load a given web address into some kind of virtual browser and return an image of the whole page.Which could be the best way and languages to develop it?Any suggestions?Somebody is able and wants to do it...
13 Feb 2015 by Richard MacCutchan
Please read Code Project Quick Answers FAQ[^]. If you have a specific question then people here will try to help you. If you want someone to do all the work for you (paid or not) then this is not the place.
25 Apr 2002 by Nicolas Gazelle
This is my attempt to create a simple toolbar class that allows to set a bitmap in the background of a toolbar.
20 Aug 2014 by Member 11010948
C++, bash, perl, R, python, ruby, nodejs, go, haskell. sysadmin, internet, data-mining, machine-learning, etc. eventually at last they all will have the same modules. I am confused and lost for which environment/language to choose. could any body with full experience to tell me the real truth...
20 Aug 2014 by Richard MacCutchan
C++a programming language widely used in Windows and Unix/Linuxbasha shell used on Unix/Linux systemsperlanother scripting language. Ugh!Ra capital letterpythona snakerubya jewelAnd if you do not know what the internet is then I am quite surprised you managed to find this...
28 Sep 2011 by abhi5306
Hihow can i call a perl function say abc() present in abc.pm from a javascript code?
1 Feb 2008 by Bharat Mallapur, sriraj
How to make your C# component callback a Perl subroutine
9 Jan 2011 by S.Raaj Nishanth
Hi,I have a small Java code which I exported to a .jar file. The .jar file has some methods, one of which is a simple method (that displays a message box). Now, I want to write a perl script that can call this method. How do I go about this? How do I import the jar file in a Perl...
9 Jan 2011 by Espen Harlinn
One solution is to call your java method from c using jni, and then create a perl wrapper for the c function.swig[^] may help you getting this done faster.Update:You can use Jace[^] to create a c++ wrapper for your java project. Then use swig to create a perl wrapper for the c++...
18 Jan 2013 by Member 9767982
I'm using Perl 5, version 14.The Win32::ODBC is VERSION = '0.034'; and Oracle as database. Im able to reteive information from the database using queries like "emp_id, emp_name from emp" by the following codeuse Win32::ODBC;$db= new...
18 Jan 2013 by Hasham Ahmad
try this??my $ST=$DB->prepare("call apps.package_name.proc(?, ?, ?)");my ($ST_result, $arg1, $arg2);...$ST->bind_param(1, $arg1);$ST->bind_param(2, $arg2);$ST->bind_param_inout(3, \$ST_result, 0, { ora_type=>ORA_RSET } );$ST->execute();while (my $hr =...
10 Nov 2011 by LordXandor
I am building a chat room for my website and am trying to figure out a way for a Perl script, that will run continuously as long as people are still logged in, to call a Javascript return protocol when someone says something. I'm not entirely sure this is possible for security reasons. Any...
12 Nov 2011 by Oliver Bleckmann
Are you talking about a voice chat? This may be a hard task and the hosting well be even harder (a lot of traffic). For a text chat see this example here http://sourceforge.net/projects/ajaxperlchat/[^] using perl and ajax. But be aware, most hosting companies limit the execution time and...
28 Oct 2014 by Ganrashi1122
please help how to start and also suggest the new idea related to make software like ERP Tally.Or better then it
27 Oct 2014 by Prasad Khandekar
Hello,Have a look at following Open Source Projects, They should help you get started. Please note that these projects are not developed in C# though.GnuCashSQL LedgerTurbo CASHRegards,
28 Oct 2014 by Richard MacCutchan
Creating a complete accounting system from scratch is a huge undertaking. Commercial packages like this have taken many man years to develop and refine. Find yourself a project more in keeping with your skills and the resources available to you.
4 Jan 2024 by Milan Belobaba 2024
Can i run perl script in IIS Express 10 What I have tried: "PERL">Can i run perl script in IIS Express 10
4 Jan 2024 by Richard MacCutchan
Yes, whether it will work or not is a different matter.
5 Jun 2014 by johannesnestler
Hi Prakash,Have a look at Dynamic Screen Resolution[^]In short, the Windows-API function[DllImport("user32.dll")] static extern int ChangeDisplaySettings(ref DEVMODE devMode, int flags);does the trick. I see you are a quite new member here on CP, so some "advice"...
5 Jun 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Try Google[^] first and try yourself.Here we answer specific questions which members face during programming. We can't work on the whole source code. You need to do that yourself.If you face any difficulty while coding, feel free to come back here and ask another question with specific...
13 May 2012 by jamaljoon
hi.how i can clear buffer printer via C# please?i use evolis printer for print smart cards.tnx
6 Oct 2012 by Sourav Sarkar-SS2
In my mysql database I have the file name of the profile pictures.like ID File_Name1 1.jpg2 2.jpg3 3.jpgand in a folder I am storing the pictures.Through code I have change the picture in the folder and with the same name as it was. So no change in...
6 Oct 2012 by Manfred Rudolf Bihy
That's easy to do by adding a dummy random parameter to the image URL like this:Instead of using a random number you could just use an increasing counter that gets incremented every time you change the images.Another approach would be to...
6 Jan 2014 by pareshmore
I have two views say A and B, c:\a_viewA - View-------Folder_1-->test.bat-------Folder_2-------Folder_3d:\b_viewB - View-------Folder_1-------Folder_2When I do findmerge (with merge option):c:\>cleartool findmerge "d:\b_view" -ftag a_view -type d -mergeI am getting...
17 May 2011 by Sandeep Mewara
It does not work like this here. I am sorry but there is no quick question here. We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here.Here is what is expected by enquirers:1. TRY first what you want to...
2 Sep 2001 by John Simmon / outlaw programmer
The Code Project discussion board in Perl. This is an open source project for the Code Project community.
3 Sep 2008 by Scott Dorman
The accepted social etiquette for posting in the CodeProject discussion forums.
7 Aug 2015 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
5 Jun 2014 by OriginalGriff
It doesn't quite work like that.We do not do your work for you.If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys.
5 Jun 2014 by ArunRajendra
Camtasia Studio is one of the most popular screen capture tool. NOTE: I am no way involved with Camtasia and this post is not to promote them.
22 Dec 2011 by nilesh.d.mankar
Hi Friends,Could any body please guide me how to concatenate the value of two variable?I have Googled for it and found lots ways but whenever I tried to concatenate I got failed.I have tried the following lines:print "Enter the name";$baseStream = ;$b = 1;$strName =...
23 Dec 2011 by Graham Breach
Your $baseStream variable is including the newline character(s). Try this:print "Enter the name";$baseStream = ;chomp $baseStream;$b = 1;$strName = "${baseStream}_Strm_${b}";print $strName;"chomp" is a function that removes the line separator from the end of a string.I've...
5 Jan 2012 by mahalatchumi
Hi, Remove the chomp and use concatenation operator(.).
16 Jan 2013 by paiyu
which language is pure object oriented language?
16 Jan 2013 by OriginalGriff
Smalltalk is the only one I can think of off-hand.However it really isn't used much, unlike impure OOP languages like Java, C#, C++ or even VB...
16 Jan 2013 by Abhinav S
First you must understand that object oriented programming is not about a language but more about a paradigm and a concept.I think Smalltalk would be one of the best ones in terms of OOPS.Other languages like Java / C# offer features which are closer to functional programming.However,...
6 Jun 2013 by suresh jaladi
i am trying to connect to the sql server database of remote machine and fetch some information using Perl Script.use DBI;my $dsn = 'DBI:ODBC:Driver={SQL Server}';my $host = 'MyPC\SQL';my $database = 'databasename';my $user = 'username';my $auth = 'password';my $dbh =...
6 Jun 2013 by Prasad Khandekar
Hello,Please Change your connect call as shown below.my $dbh = DBI->connect("$dsn;Server=$hostIP;Database=$database;",$user,$auth) ||die "Database connection not made:: $DBI::errstr";More help can be found in this document.Regards,
5 Aug 2012 by bibin gangadharan
Hi,Convert a grayscale image into rgb color image using VB.net?
5 Aug 2012 by Christian Graus
This is not a question. It's not even a sentence, unless it's a command. What you want to do is impossible, I guess that's why you didn't even attempt it before asking us to do it. If you remove colour, you can't put it back. It can't be done.
15 Aug 2012 by Razan-Masri
Converting grayscale images to RGB carries 2 meanings:1. The direct conversion that is only possible in the sense that the resulting file will still contain gray shades, but they will be stored in RGB pixels2. The manual user-assisted conversion where an artist takes every part or pixel of...
24 Sep 2012 by Member 8530231
i wont to convert this script to c# ,any Professional coder can help me !#Grab the attacker's IP address from the alert filesub get_alert_ip{open (ALERT, "alert.ids") or die "Cannot open or read alert file";while (){next if (/^\s*$/); #skip blank linesnext if (/^#/); # skip comment...
24 Sep 2012 by Mehdi Gholam
Perl is a write once and don't dare to touch again scripting language. Even at it's best it can be hard to understand.what you can do is extract the notion of what the perl script is doing and implement it as best you can in c#.
2 Sep 2014 by Member 8788045
sub new{ my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; bless($self, $class); # Run initialisation code $self->_init(@_); return $self;}
27 Sep 2013 by Vib8
Could someone please help in converting this Perl code to .Net?sub xor16 {local(@x) = @_[0..15];local(@y) = @_[16..31];local(@results16) = ();for($j=0;$j
27 Sep 2013 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Nobody can do this for you.If you know both the languages, then you will be able to convert it.First try to understand the logic which is implemented and then try to convert it to the equivalent code in .NET.If you can't understand the logic, then try to learn Perl first or take help...
28 Sep 2013 by Andreas Gieriet
Assumin you know what the Perl program achieves and assuming you have a suitable test suite to verify that functionality, then you may start as described below:1) Be aware: Perl has only a weak type system. C# has a far mor strict type system.2) So, first find out what the values represent...
27 Nov 2017 by Arlert
Hi and Happy new year.Is there anywhere perl script converter to other languages like c++ or c#?If yes, can you please give me link to it, or can you write this code:foreach $pair (split('&', $form)) { if ($pair =~ /(.*)=(.*)/) { ($key,$value) = ($1,$2); ...
2 Jan 2015 by OriginalGriff
It doesn't quite work like that.We do not do your work for you, either homework or your paid job.If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys.I assume that...
2 Jan 2015 by bling
Your C or C# program can invoke the perl shell as an external command. Here is a C# example.https://social.msdn.microsoft.com/Forums/vstudio/en-US/ea9455e1-b254-49e1-99df-41718ea80b5b/how-to-run-perl-scripts-in-c?forum=csharpgeneral[^]Your C program can link to the Perl interpreter...
3 Jan 2015 by Andreas Gieriet
This only makes sense as an isolated exercise to venture into new territory.If the source language (perl in this case) is too dense, translate it first into some invented pseudo code. Name each operation with a function name (e.g. substitute all ocurances of pattern X in variable Y by text Z,...
11 Jul 2012 by Gssankar
HiHow to convert the px to em and pt to em. Is there is any formula.RegardsSiva
11 Jul 2012 by Richard MacCutchan
Yes, and it's really quite easy to find[^].
22 Apr 2014 by Sergey Alexandrovich Kryukov
Please stop re-posting. Your post is about to be auto-deleted due to abuse reports. This is not a question. You need to do your job yourself. We would gladly answer your questions.—SA
11 Jan 2010 by mahesh sonu
:(( How to save file as a csv file,extrated data from mysql database
11 Jan 2010 by Christian Graus
Scratch all of that. You're using PHP, and Perl ?
12 Jan 2010 by HimanshuJoshi
Following pseudo-code is essentially you need to do#Make connection$Connection = DBI->connect(server, username, password);#Create empty csv fileopen(MyFile, ">test.csv");#Make a query$QueryString = qq{select * from database-table};$Query =...
2 Feb 2007 by alex turner
How to read an XML data source from file or AJAX and then represent it in Internet Explorer as a GUI
1 Jan 2014 by Reshma Babu
A pre-commit hook script scenario:Whenver a user tries to check-in the code into the svn repository, a sonar analysis must be done. If there are any violations, the commit must not not be allowed. I am new to this. So please guide me.
1 Jan 2014 by dan!sh
Please refrain from such hooks. If your code base is considerable in size, it may take a lot of time to check in based on the amount of time required to analyse.You should take a look at continuous build integration servers. These do a build and analysis in background.
17 Jan 2014 by Reshma Babu
I have create a .exe file, which calls the .bat file and runs the analysis. Based on certain error messages in the log file generated during the analysis, I will set the exit code of the .exe file. If exit 0, commit succeeds, else fails.This link helped a lot:TortoiseSVN pre-commit hook...
20 May 2012 by RoboAlex
Hi,I am working on a big Java project which is on eclipse. To use the program we need to invoke a perl script in the terminal with the parameters then that script will call the program. In this case how can I debug the java program in eclipse?Thank you, Regards, Robo
20 May 2012 by TorstenH.
That makes no sense: "Java project which is on eclipse"I'm running on coffee and my applications might be developed in the Eclipse IDE, but they are not on Eclipse.WHY would someone want a Perl script to start the app?What kind of application is this? Do you use a framework like...
28 Jul 2016 by Omar Al Zabir
Protect ASP.NET and WCF from various brute force and Denial of Service attacks and speed up response time using nginx.