Click here to Skip to main content
14,974,357 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 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..
by Oscar-Tark
If you are looking into white hat hacking, it's good to know old school tactics used for overflows.

All Articles

Sort by Score

Perl 

Please Sign up or sign in to vote.
28 Jul 2016
Omar Al Zabir
Protect ASP.NET and WCF from various brute force and Denial of Service attacks and speed up response time using nginx.
Please Sign up or sign in to vote.
30 Aug 2019
Oscar-Tark
If you are looking into white hat hacking, it's good to know old school tactics used for overflows.
Please Sign up or sign in to vote.
27 May 2021
Oscar-Tark
In this article, we will be looking at a more advanced version of a buffer overflow attack.
Please Sign up or sign in to vote.
10 Aug 2010
anshulskywalker
Understanding of Example Based Machine Translation (EBMT) system and how to create your own using exisiting tools
Please Sign up or sign in to vote.
28 Aug 2001
Uwe Keim
Tiny little Perl library to retrieve an arbitrary URL as a string
Please Sign up or sign in to vote.
20 May 2010
Sauro Viti
This looks like homework... Why don't you try doing it by yourself? After that if you have problems with some specific issue you can ask here: post a code snippet of what you have done, and a description of what doesn't work like you expected.
Please Sign up or sign in to vote.
4 Apr 2011
eh.azimi
You can use "Lingoes" dictionary. It is a free powerful dictionary. Follow link:http://www.lingoes.net
Please Sign up or sign in to vote.
8 Oct 2011
Mehdi Gholam
Career language choices usually involve what jobs are out there in the market place.The best advise is to learn as much as you can and see where that takes you, and which language you prefer and is easier for you.What is important is not the language itself but the logical problem...
Please Sign up or sign in to vote.
8 Oct 2011
Sander Rossel
What do you mean with "a background in C, Java, COBOL, Perl and Python"? That does not sound like you are a starter. Anyway, it's a nice point to start. Pick up any of those languages. Isn't Java the most popular programming language in the world and aren't Java programmers paid the best as well...
Please Sign up or sign in to vote.
19 Oct 2011
fjdiewornncalwe
You could do this in a couple of different ways.The best would be to create the appropriate regular expression to clean the data as you want it, but another solution could be to do the following and then just add in a check for non-numeric characters in each column: I found this...
Please Sign up or sign in to vote.
14 Oct 2015
Jochen Arndt
You won't be able to find a batch file to Perl converter or vice versa. pl2bat is not a converter. It is a tool that creates a batch file that is executing perl and passes the perl code contained in the same file (see here for an example:...
Please Sign up or sign in to vote.
29 Feb 2020
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.
Please Sign up or sign in to vote.
12 Feb 2010
Kythen
Ten seconds with our friend Google gave me this: http://perldoc.perl.org/utf8.html[^]
Please Sign up or sign in to vote.
16 Jan 2011
Dan_Sc
2 alternatives  
I am working on a thesis project and would like to run the program X-Plane for Mac from within a presentation (the presentation could be it's own program if necessary). At one point in the presentation, I would like X-Plane to be framed inside a slide and be able to operate the program with...
Please Sign up or sign in to vote.
16 Feb 2011
jswolf19
Hashes in perl are called hashes because they store the data in a hash table. Hash tables use a hash function to calculate a key based on the value you give it and allow for fast searches at the expense of memory.Using your example, say the hash table has 26 entries, and the hash function...
Please Sign up or sign in to vote.
19 Jul 2011
Uilleam
I believe your error is rooted in not really understanding the meaning of my. You are using it all over the place, but when you do that you are creating a new variable in the enclosing block. You should really go back and check every instance of my to see if that is what you really want to...
Please Sign up or sign in to vote.
16 Oct 2011
Espen Harlinn
If you have a background in COBOL – recruiters for insurance companies have been looking for you for a while – if you can translate COBOL to java and/or c#, and that seems likely, they’ll probably be even happier to have a chat with you ...Best regardsEspen Harlinn
Please Sign up or sign in to vote.
24 Mar 2012
Sergey Alexandrovich Kryukov
I'm really afraid my help could be not very useful. I'm presenting a complete solution based on .NET and C#. The problem is way too simple: just a combination of two rotations. If you did not know how to calculate that, I would afraid just using the code would also be a problem. Anyway, let's...
Please Sign up or sign in to vote.
17 Mar 2013
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...
Please Sign up or sign in to vote.
5 Jun 2014
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...
Please Sign up or sign in to vote.
20 Aug 2014
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...
Please Sign up or sign in to vote.
4 Mar 2015
rjdudley
1&1 has become one of the most successful and popular hosting companies in the world by offering simple, inexpensive ($0.99/month for three months, then $8.99/month thereafter) and feature-rich hosting plans.
Please Sign up or sign in to vote.
22 Dec 2015
Richard MacCutchan
I already gave you a suggestion yesterday in your original of this question[^].
Please Sign up or sign in to vote.
7 Mar 2017
Jochen Arndt
Use my solution to your question How do I remove the subdirectories from the directory struture using Perl?[^] as starting point (untested EDIT: tested and fixed errors):sub DelTaskFiles{ my ($workdir) = shift; #print "Processing '$workdir'\n"; my $mask = $workdir . '/*'; #...
Please Sign up or sign in to vote.
6 Jul 2017
Simon Sparkes
A simple way of extracting all images from a RESX file using a simple perl script
Please Sign up or sign in to vote.
17 Mar 2021
CPallini
Try fin = open('input.txt', 'r') fout = open('output.txt', 'w') linesin = fin.read().splitlines() seqnum = 1 previous = None for lin in linesin: if previous != None: if lin == 'APPLE': previous += str(seqnum) seqnum = seqnum +...
Please Sign up or sign in to vote.
3 Mar 2010
Graham Breach
The simplest way to install Perl modules is to use CPAN:% perl -MCPAN -eshellCPAN[1]> install DBIIn your case it looks like you are missing some headers - try installing the kernel-headers RPM (using up2date, yum, apt-get, etc.) before trying to install DBI.
Please Sign up or sign in to vote.
10 Jun 2010
Peter_in_2780
The error message says it all:Chetrabbu wrote:verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()You need to tell your PHP environment how to contact an SMTP server. There obviously isn't a local one running, so you need to either set one up or use your ISP's one. To use...
Please Sign up or sign in to vote.
17 Nov 2010
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...
Please Sign up or sign in to vote.
2 Dec 2010
wizardzz
As far as using StringBuilder, it is good to be aware of its uses even if it is not the problem. You can use it instead of string but it is not an exact replacement. On a high level, it simply makes better use of memory than a string because it does not recreate a string every time you modify...
Please Sign up or sign in to vote.
16 Jan 2011
#realJSOP
I think the only way you could pull this off is if the application in question could be constrained in a window that your own application creates. Since X-Plane is a game, and since most game companies would never even consider running their game in a window that wasn't borderless and full...
Please Sign up or sign in to vote.
16 Jan 2011
Espen Harlinn
One alternative could be to use VNC.Here is an osx compatible product:OSXVNC[^].You should be able to embed a VNC client inside your presentation program.RegardsEspen Harlinn
Please Sign up or sign in to vote.
2 Feb 2011
Manfred Rudolf Bihy
If I'm not completely mistaken I think that the backslash is an escape character in Perl. So if you really mean to use it will have to escaped as well:{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}From the look of the start of your file it...
Please Sign up or sign in to vote.
30 Mar 2011
OriginalGriff
AFAIK, there is no such tool: the possibility of eval($string) makes it unlikely! If it is that small, I would suggest you will find it quicker to do it manually.
Please Sign up or sign in to vote.
2 Apr 2011
Hans Dietrich
I don't know if these meet all your requirements, but there are some free dictionaries available here: http://www.dict.org/w/databases/dict[^]
Please Sign up or sign in to vote.
11 Dec 2011
Sergey Alexandrovich Kryukov
Well, this is a problem. And the problem is not just the dictionary, but the dictionary format.The only open format I know is XDXF, see http://xdxf.sourceforge.net/[^]. This standard supports Unicode (of course, as it is XML-based); and one important point of using Unicode was support of...
Please Sign up or sign in to vote.
12 Jul 2011
Uilleam
It would be good if you would show what you have tried, but in absence of that, I think all you likely need to do is look up printf, and use a format like %03d. Assuming you have a decent Perl installation, you should be able to find out all you need at the command line with perldoc -f sprintf....
Please Sign up or sign in to vote.
12 Jul 2011
mla154
Here is a program that prints line numbers:$file = 'results.log';open(INFO, $file);$count = 0;while ($line = ){ $count++; print "$count $line";}close(INFO);According to the tutorial, to solve the second part, one only needs to change one line by inserting an extra four...
Please Sign up or sign in to vote.
16 Oct 2011
Abhinav S
It would depend a lot on the area where you are located and what opportunities you have around you.Java would probably be the right choice in terms of number of opportunities.However, if you can carve a niche for yourself in C and Cobol, you are likely to get paid more as there is less...
Please Sign up or sign in to vote.
16 Oct 2011
RaviRanjanKr
This link-[Search and replace across many files with a perl one-liner][^] might help you.
Please Sign up or sign in to vote.
4 Nov 2011
E.F. Nijboer
You might want to add this first:use PDL;If it still can't find the library. You need to specify the path to it or add it to the environment.use lib "./PDL-2.4.3";Check out this link for more info:http://docstore.mik.ua/orelly/perl/prog3/ch31_13.htm[^]Good luck!
Please Sign up or sign in to vote.
12 Nov 2011
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...
Please Sign up or sign in to vote.
8 Dec 2011
#realJSOP
296 MILLION google results regarding "perl"[^]...and you couldn't find the info you seek?
Please Sign up or sign in to vote.
23 Dec 2011
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...
Please Sign up or sign in to vote.
7 Jan 2012
Carlos Luis Rojas Aragonés
How to backup multiple databases using Perl
Please Sign up or sign in to vote.
5 Jan 2012
mahalatchumi
Hi, Remove the chomp and use concatenation operator(.).
Please Sign up or sign in to vote.
6 Jan 2012
Andreas Gieriet
Classical application of XSLT: XML to XML.
Please Sign up or sign in to vote.
20 Mar 2012
nv3
Ok, I think that I now know what you mean. Let me repeat it in my words, so you can cross check that I have understood your goal. We have two wheels (circles) mounted with their axels in different positions and touching each other at the 12 o'clock point. Both rotate with 1 rpm. On each wheel...
Please Sign up or sign in to vote.
5 Apr 2012
nv3
In my opinion, OriginalGriff has given a very good description what awaits you with C++ and .Net. But before you decide, which programming language to pick as your first one (others will follow!) consider the following:- The programming language is most often the easiest part to master....
Please Sign up or sign in to vote.
10 Jul 2012
Wes Aday
rename OLDNAME, NEWNAMEhttp://forums.devshed.com/perl-programming-6/moving-files-in-perl-7833.html[^]
Please Sign up or sign in to vote.
11 Jul 2012
Richard MacCutchan
Yes, and it's really quite easy to find[^].
Please Sign up or sign in to vote.
13 Jul 2012
Carlos Luis Rojas Aragonés
Simulate user interaction in console apps with perl
Please Sign up or sign in to vote.
28 Jul 2012
David Jeske
You can begin by reading some regex documentation. The trailing "\s*" does nothing. It is interpreted as zero or more occurances of a whitespace character.Here is a simple to understand regex review ...http://www.cs.tut.fi/~jkorpela/perl/regexp.html[^]As for more specific trouble.....
Please Sign up or sign in to vote.
15 Aug 2012
Faez Shingeri
2 alternatives  
@func is an array containg names. I want to assign values to each name as below, but it does seem to work.for ($i=0;$i
Please Sign up or sign in to vote.
15 Aug 2012
Faez Shingeri
This solved my issue :-Dfor ($i=0;$i
Please Sign up or sign in to vote.
30 Sep 2012
Maverick143
use following linkhttp://www.perlmonks.org/?node_id=646596[^]Thanks,-Mangesh.
Please Sign up or sign in to vote.
6 Oct 2012
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...
Please Sign up or sign in to vote.
18 Jan 2013
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 =...
Please Sign up or sign in to vote.
23 Feb 2013
Pranit Kothari
Fortunately many of the languages you mentioned are open source. Download their code, try to understand it. Very first step is to able to work with these languages and technology. I am not sure weather you are able to program (professionally) using HTML and PHP etc.
Please Sign up or sign in to vote.
25 Aug 2013
H.Brydon
What you want to learn about is "Data marshalling" and "serialization". Google should give you many links that are helpful.
Please Sign up or sign in to vote.
30 Jan 2014
Kornfeld Eliyahu Peter
There is no error - error code 0 means, no error!
Please Sign up or sign in to vote.
16 Feb 2014
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
Please Sign up or sign in to vote.
5 Jun 2014
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"...
Please Sign up or sign in to vote.
31 Jul 2014
KarstenK
Thats a lot of questions. You can stay on the Mac because it has the power of C++ in its language Objective C. Register by Apple to access the online documentation: it is fine and has some sample. Tip: Consider NOT using the new language Swift, because the web is full of objective C...
Please Sign up or sign in to vote.
10 Aug 2014
Groulien
Inside your 'for' loop:if (i % 100 == 0) { $nr += 1;}
Please Sign up or sign in to vote.
27 Oct 2014
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,
Please Sign up or sign in to vote.
14 Aug 2015
Wendelius
Based on the tag you're using Perl. In that case you can use a question mark (?) as a place holder for the parameter and then use bind_param to set the value for the parameter before execute.Have a look at:- A Short Guide to DBI[^]- 5.3. Binding Parameters to Statements [^]
Please Sign up or sign in to vote.
23 Oct 2015
Sergey Alexandrovich Kryukov
As a first line of defense, you can check up the HTTP referral, which is one of the HTTP header fields of an HTTP request:https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields[^],https://en.wikipedia.org/wiki/HTTP_referer[^].All scripting modules for all non-nonsense...
Please Sign up or sign in to vote.
25 Oct 2015
Andreas Gieriet
Google?E.g. enable perl apache?E.g. http://www.perlmonks.org/?node_id=9060[^].RegardsAndi
Please Sign up or sign in to vote.
6 Feb 2016
John Jiyang Hou
An algorithm to determine if a point is inside a 3D convex polygon for a given polygon vertices in Perl
Please Sign up or sign in to vote.
20 Apr 2016
Richard MacCutchan
Try some research: perl split string - Google Search[^].
Please Sign up or sign in to vote.
9 May 2016
AnvilRanger
A perl script is just another text file with a pl extension. You can use VB or VBA to write to a text file.You tagged the question VBA, but then as VB in the actual question. Which are you really using? Because writing to a file is different between the two.VBA:VBA - Text...
Please Sign up or sign in to vote.
21 Feb 2017
Jochen Arndt
That is because the file result_file.txt is still opened for writing and the content has not yet been written physically (flushed) when you are opening it again for reading.While you can force flushing using $fh1->flush(), a better solution is closing file handles when not needed...
Please Sign up or sign in to vote.
21 Feb 2017
Jochen Arndt
See the file test operations at perlfunc - Perl builtin functions - metacpan.org[^].use Cwd;my $curdir = cwd();if (-e $dir && -d $dir){ print "$dir is an existing directory at $curdir\n";}
Please Sign up or sign in to vote.
1 Mar 2017
Jochen Arndt
You have to iterate over the directories.A possible solution:use File::Basename;sub ProcessDirectory{ my ($workdir) = shift; print "Processing '$workdir'\n"; my $mask = $workdir . '/*'; # glob: Return list of filename expansions for search mask # grep -d:...
Please Sign up or sign in to vote.
5 Mar 2017
Jochen Arndt
You are using GetOptions at one place and access command line arguments via $ARGV at other places. When using GetOptions, all matching arguments are removed from $ARGV[].So when executing the script with./generate.pl -prjroot "/home/rpsa/EMO/ct_space" -outdir "/home/rpsa/output" -mapfile...
Please Sign up or sign in to vote.
9 Mar 2017
Jochen Arndt
Your expression looks for optional white spaces (\s*) followed by an equal sign. Change it to match any characters before the equal sign:$href=/^.*=.*\n//g; Or if there is alway text (letter, digit, or underscore) without spaces:$href=/^\w+=.*\n//g;
Please Sign up or sign in to vote.
15 Mar 2017
Jochen Arndt
You can't use a transliteration for this because those operate on characters from a list but you want to match the substring _..So you have to use a regular expression:$str =~ s/_\././g;s: Search and replacepattern _\.: underscore and dot (dot must be escaped)replace with .: dot...
Please Sign up or sign in to vote.
27 Oct 2017
CPallini
I usually go with the first option (even with return, if appropriate) because of less code to type and see. However it is just personal taste.
Please Sign up or sign in to vote.
27 Oct 2017
W Balboos, GHB
I would prefer the internal break - it's absolutely clear and makes it easier to follow if one has, for example, multiple handlers for a desired value and a break; Alternatively, the while() test could grow and grow, becoming more difficult to understand and easier to code with errors. Also,...
Please Sign up or sign in to vote.
27 Oct 2017
Patrice T
My like goes to first option. But I use both depending on situation, there is no absolute rule.
Please Sign up or sign in to vote.
27 Oct 2017
BillWoodruff
I don't think the two examples shown are comparable. When the loop on the second example exits, information persists in a variable 'tentatives that will tell you how many iterations occurred to find the match ... if it found the match. The first example does not persist the iteration count. The...
Please Sign up or sign in to vote.
5 Feb 2018
CPallini
Using different programming languages makes the developer take adavantage of both (or more) language features. In a typical sceneario, you embed a scripting language (e.g. Lua or Python) into an application (written with a non-scripting one like C++, C# or Java) to make it easily customizable to...
Please Sign up or sign in to vote.
9 Jun 2018
Richard MacCutchan
PHP and Perl are two completely different beasts. And as it is a school project you should do your own homework, rather than expecting someone else to do it for you.
Please Sign up or sign in to vote.
29 Sep 2019
Dave Kreskowiak
If you're not familiar with Perl, what do you want from anyone answering this? Step 1: You MUST learn the language before you start writing code in it.
Please Sign up or sign in to vote.
24 Aug 2020
Sandeep Mewara
You can use exists() function. # Calling the exists() function if(exists($fruit{'apple'})) { print "Exists\n"; } else { print "Not Exists\n" } Refer: Perl - Hashes - Tutorialspoint[^]
Please Sign up or sign in to vote.
24 Aug 2020
Garth J Lancaster
For the first part, you could think about using the 'exists' Perl keyword, as in : if (exists($fruit($praticular_product)) { print "Found Apple in fruit\n"; } else { print "Apple not found in fruit\n" } you can use 'for' to iterate (loop...
Please Sign up or sign in to vote.
25 Nov 2020
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...
Please Sign up or sign in to vote.
6 Sep 2000
Milan Gardian
Notes on updating your WTL installation
Please Sign up or sign in to vote.
16 Sep 2009
cyber_flash
Check if a server handles the Idle Connection Limit properly
Please Sign up or sign in to vote.
11 Jan 2010
mahesh sonu
2 alternatives  
:(( How to save file as a csv file,extrated data from mysql database
Please Sign up or sign in to vote.
3 Mar 2010
tiancehngbo
1 alternative  
my steps are:1、 cd DBI-1.6092、 perl Makefile.PL3、 make now,it's comes error like lists: cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.609\"...
Please Sign up or sign in to vote.
13 Apr 2010
josephong
Hi mates,I have made a PERL/CGI script and making it read data from a database(POSTGREsql).Im able to run on Command windows but unable to run it when i start it with localhost using Apache.I have allow permission for the tables in the database.I'm running on windows XP pro.Any...
Please Sign up or sign in to vote.
20 May 2010
Dalek Dave
This is a fairly straight forward 'list through items' problem, and if it is homework, you really need to attempt it.Think about it in psuedo code first, and it will be obvious and easy to solve.Far better you attempt it yourself.
Please Sign up or sign in to vote.
18 Aug 2010
techno_manuj
1 alternative  
Hi,I need the answeres of following two questions:[1] How can we create perl web service ?[2] How can we create wsdl from given perl web service URL ?Thanks
Please Sign up or sign in to vote.
18 Aug 2010
Abhinav S
You can create a web service in PERL using a utility called SOAPLite[^].
Please Sign up or sign in to vote.
8 Oct 2010
Yuvaraj Gogoi
Hi,Please provide me an example for updating only a particular node in xml with perl? Please refer me a link if any link exists. I tried a lot in google. Thanks in advance!Regards,Yuvaraj
Please Sign up or sign in to vote.
5 Nov 2010
silverpassat
3 alternatives  
I have a subroutine that passes a value to another subroutine. In the second subroutine I try to operate on the argument that was passed to it by using $_ and this is not working.If I try to print out $_ in the second subroutine, I get the argument string that was passed to the first...
Please Sign up or sign in to vote.
7 Nov 2010
Andreas Gieriet
A Perl function gets an array of argumnents.That array is referenced by @_.I usually do the following:sub FunctionName { my ($arg1, $arg2, ... ) = @_; ...}In your case, you want to split the first argument of the argument array (@_).You have several options:sub...
Please Sign up or sign in to vote.
8 Nov 2010
silverpassat
Awesome!. That provided me some juch needed help. One thing I notided is that if I assign the @_ to a variable in the subroutine like the following sub arrayMkr{ my ($sectionIn) = @_;}the code executes properly but if I use this...sub arrayMkr{ my $sectionIn...
Please Sign up or sign in to vote.
9 Nov 2010
Andreas Gieriet
See http://perldoc.perl.org/perldata.html[^] for a description on the meaning of $scalar, %hash, @array, and (list). Especially, search for @foo in that man page for an explanation on "mixing" arrays and lists with scalars.You may also check out an (old bust still valid) OO-Perl Demystify...
Please Sign up or sign in to vote.
29 Nov 2010
asjadazeez
1 alternative  
Hello,I have this small code to do in perl and i am now very sure of how to do it. I have read a line from the csv file int0 $_and now i need to extract a part of the string from it.Ex line in csv file would be one;two;three;four;five;sixand i need to have a variable (a scalar) to...
Please Sign up or sign in to vote.
29 Nov 2010
Manfred Rudolf Bihy
What you need is this:$info = "one;two;three;four;five;six;"@items = split(/;/, $info);$extract = @items[3] + @items[4];Now extract should contain the string "fourfive".Arrays in perl are normally zero based, but I think there was something to change that if you really needed...
Please Sign up or sign in to vote.
1 Dec 2010
R. Erasmus
HeyaHere is two solutions:(1)Try reading X thousand lines at a time, save where you ended off, save X to a temp file, start reading again from i + X thousand lines for a further X + thousand lines, store in another temp file, and so on till the e.o.f. is reached. Write all the temp...
Please Sign up or sign in to vote.
2 Dec 2010
asjadazeez
1 alternative  
Hello, I am unable to do this in PERL although this i can do easily in C#.The problem is like this:I have a file name Eg: C:\foo\tempfolder\testfolder\data.txtand now i use the data.txt file extract some data from it and then write it back to another file with file name...
Please Sign up or sign in to vote.
2 Dec 2010
HimanshuJoshi
You can pass path separately and source and destination file names separately. Like following$Path = "C:\\foo\\tempfolder\\testfolder\\";$SourceFile = $Path . "data.txt";$DestinationFile = $Path . "data_extract.txt";open ($SFILEHANDLE, '
Please Sign up or sign in to vote.
7 Dec 2010
AspDotNetDev
I don't know Perl, but I can give you a general strategy.Find the first match. Remove all text up to and including it.Find the second match. Remove all text up to it.Search the remainder of the text.Also, some regular expression engines allow you to specify a starting position in the...
Please Sign up or sign in to vote.
28 Dec 2010
Slacker007
Is this what you are talking about[^]
Please Sign up or sign in to vote.
9 Jan 2011
S.Raaj Nishanth
1 alternative  
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...
Please Sign up or sign in to vote.
23 Jan 2011
Divya Kambhatla
Hi, I have tried extracting the content from PDFs in java using api's like PDFBox and iText but am not being able to get the content from watermarked PDFs. PDFBox : cannot extract content from watermarked PDFs.:confused: iText: only the latest version can, but this again fails for 2...
Please Sign up or sign in to vote.
1 Feb 2011
stevenandler
1 alternative  
{\rtf1\ansi\an...
Please Sign up or sign in to vote.
9 Feb 2011
sund7wells
1 alternative  
Hi,I am new to Perl Scripts.I want load a xml formatted string into xml document and parse it using xpath to fetch particular elements value.need guidance in it.Thanks in advance
Please Sign up or sign in to vote.
9 Feb 2011
Manfred Rudolf Bihy
Please have a look here: http://www.xml.com/pub/a/2001/05/16/perlxml.html[^]. There's a tutorial right there that will be helpful to you in getting started.Best Regards,Manfred
Please Sign up or sign in to vote.
10 Feb 2011
Trollslayer
2 alternatives  
I have two system that I need to get talking together over sockets (preferably TCP).I tried a Perl client to a C# socket server but the Perl client stopped after sending the message, I think there was an acknowledgement problem.Does anyone have experience of this?I have Perl-Perl and C#-C#...
Please Sign up or sign in to vote.
10 Feb 2011
Nish Nishant
Hard to say without seeing the implementations, but sockets are supposed to be language agnostic, so one of your implementations has a bug (or perhaps both).
Please Sign up or sign in to vote.
13 Feb 2011
stevenandler
I have the following Perl/Soap script to connect to a website. I need to add a section to send files with a hl7 extension from a folder c:\ftp\newtown. If someone can provide me with a sample on how to add this to my script I would greatly appreciate it. # remove the +trace => all to remove...
Please Sign up or sign in to vote.
16 Feb 2011
Trollslayer
Got it working, test sample below (runs in a separate thread): public void Listen() { int ByteRead; IPAddress ipAddress = Dns.GetHostAddresses("localhost")[0]; TcpListener tcpListener = new TcpListener(IPAddress.Any, 399); ...
Please Sign up or sign in to vote.
23 Feb 2011
tanujm
2 alternatives  
i have one tcpdump file (say abc.cap) , which can only be opened using ethereal or tcpdump.i want to open that file and do some pattern matching using perl.can i have some idea how to open that file using tcpdump in perl script???
Please Sign up or sign in to vote.
26 Feb 2011
Manfred Rudolf Bihy
Here's a description of the tcpdump file format: http://www.tcpdump.org/pcap/pcap.html[^].That's all you should need to read that file and interpret it.Cheers!
Please Sign up or sign in to vote.
3 Mar 2011
tanujm
this worked for me ! :-D tcpdump -qns 0 -X -r serverfault_request.pcaptcpdump -qns 0 -A -r blah.pcap
Please Sign up or sign in to vote.
5 Mar 2011
Sergey Alexandrovich Kryukov
I just took a look at your other Regular Expression Questions.This question is one of the most elementary one, would take few minutes to solve and test.Taking into account your previous Questions on the topic, I can see that answering your questions gives no results, just the opposite: my...
Please Sign up or sign in to vote.
14 Mar 2011
Grumbles22
1 alternative  
Hello all! I have a text file that's too large to be processed without doing it line by line, and yet I need to do multi-line matching. I'm trying to write a script to chop the parts out that I need (both Section 1's) Here's what I Have so far: $insidesection = 0;while (defined($line...
Please Sign up or sign in to vote.
31 Mar 2011
Member 7762422
4 alternatives  
Hi,I got a small script in Perl that needs to be converted to C#. I want to use it in my C# Windows Form application. Does any know if there is an program to convert Perl to C# ?Thanks in advance!----------------------use MIME::Base64;use strict;use SOAP::Lite;#...
Please Sign up or sign in to vote.
30 Mar 2011
Michel [mjbohn]
This looks like consuming a standard webservice. Just add a ServiceReference to your project and provide it with the URI to the webservices WSDL. VS will set up all types and methods of the Webservice.With s.th. likeprivate ServiceReference1.YourServiceSoapClient _wsclient = new...
Please Sign up or sign in to vote.
3 Apr 2011
ZeeroC00l
I would suggest you write a small function which opens the file and puts the content into a variable. You can pass a file name to open to the function and the content will be returned in @CONTENTSsub open_file{ my $FILE = $_[0] ; open(FILE,"$FILE") or print ("unable to open $FILE...
Please Sign up or sign in to vote.
5 May 2011
Eldingar
1 alternative  
Hi,I have a *.csv file, contains 7 columns and many lines. First line is header.I want to read csv file line by line and draw a graph.I need second and fifth columns to put them into a hash likefifth column is values and horizontal axis, second column is keys and vertical axis.How...
Please Sign up or sign in to vote.
5 May 2011
fjdiewornncalwe
Since you are not asking a specific coding-based question, I'm not going to provide a code-based answer, but rather the logic you will need to figure out in code.1) Locate, validate and open the file.2) Read the file line by line. 2a) Process each data line putting the values derived...
Please Sign up or sign in to vote.
14 May 2011
deepakrout1987
Hi,I am new to perl. I need a code to read a csv file and replace the 5th field by a value.E.g. in the csv file if the 5th field is 'C' , then replace it as 1 else replace with 2.The output file must be a different file.I have written a code for it. Can anyone tell me if its...
Please Sign up or sign in to vote.
17 May 2011
merturk
1 alternative  
I make a project to control amazon ec2 with Perl code. I prepare my ubuntu and run packages but don't know how can I write the Perl code. Is there anybody who can help me about this homework?Comment from OP:I know perl but I don't know how can I do that project I don't need to tutorial.
Please Sign up or sign in to vote.
17 May 2011
HimanshuJoshi
Start by reading basic per tutorials. You can find many like this[^].
Please Sign up or sign in to vote.
17 May 2011
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...
Please Sign up or sign in to vote.
22 May 2011
Yvan Rodrigues
Does the anonymous web user (usually www on un*x servers) have Execute file permissions on the perl interpreter?
Please Sign up or sign in to vote.
7 Jun 2011
explorerC
I have a COM server installed locally on my machine .I want to access the server using a client written in perl.Pleaseimport win32::OLE;import Win32::OLE qw(EVENTS);my $TM = win32::OLE->(serverName)using the above code im not able to access tthe servergetting an...
Please Sign up or sign in to vote.
7 Jul 2011
harish85
If you want just want plain implementation just use single print statement to a file .CSV file is nothing but fields seperated by comma.open (MYFILE, ">>$tempFile");print MYFILE "field1,field2,field3\n";If you want to use Text::CSV,Then I don't think you should use that "my"...
Please Sign up or sign in to vote.
12 Jul 2011
Uilleam
Thanks for the code. All you need to do is replace your print with this:printf('%03d %s', $count, $line);%03d specifies 3 characters of d format (signed integer in decimal, hence the 'd' - history sometimes gives us unlikely results) with leading zeros (but see what happens after line...
Please Sign up or sign in to vote.
12 Jul 2011
mla154
3 alternatives  
Hello,I decided to learn some Perl and I found this tutorial by Nik Silver: http://www.comp.leeds.ac.uk/Perl/[^].  In the Control Structures exercise, I solved the first part: putting a line number before each line, but I don't know how to solve the second part: putting a 3-digit number...
Please Sign up or sign in to vote.
12 Jul 2011
Uilleam
Have you tried logging the value of $button that is received by this code (e.g. I notice in your posting you call it both "show me my password" and "Tell Me My Password")? That might help you debug it.I should also note that tr certainly isn't any kind of encryption and would only stop the...
Please Sign up or sign in to vote.
29 Jul 2011
markkuk
See the BitTorrent Protocol Specification[^]. You send a HTTP GET request to the tracker URL with the info_hash and other data required by the standard as query parameters.
Please Sign up or sign in to vote.
7 Aug 2011
badour
pleas i want to find lanCactuse intrusion detection system source code , it was written by using perl language at 2003.pleas help me
Please Sign up or sign in to vote.
10 Aug 2011
Tsunamy_boy
You'll get in return a beencod line that you can parse with certain class that you can find on google : )The hash represents the torrent on the tracker, the hash is like an ID to it, it's like your name, the bittorrent program sends a request to the tracker with the name of it (in...
Please Sign up or sign in to vote.
22 Aug 2011
Thushar S
1 alternative  
I need help to write a program to draw a hut shape in C# , given an index. The index can be above 4 and only an even number.The figure is that shown below for the index 6: * * * * ** * * * * * * * * *
Please Sign up or sign in to vote.
22 Aug 2011
Prerak Patel
Funnily, I used to love such * programs in C. I wouldn't have answered this, but I couldn't stop trying this after a long time. You can make a hut with something like this, Dim inp As Integer = CInt(InputBox("Even Number > 4")) Dim output(,) As String ReDim output(inp - 1,...
Please Sign up or sign in to vote.
27 Sep 2011
A V Suresh Reddy
1 alternative  
I need the following:1. I want to open a new command prompt window with PERL script2. Run the remaining PERL script on that window.How to do this?Please answer me if you know.this is very urgent help me............
Please Sign up or sign in to vote.
28 Sep 2011
Uilleam
You may need to be more specific about your goals, but from what you've said, I do not think you can have a single script execute partly in one CMD window and partly in another one in the way you mention. If you want multiple versions of a script operating you should look into fork[^]which will...
Please Sign up or sign in to vote.
28 Sep 2011
abhi5306
HiI want to pass a hashref to a CGI script.when I pass the hashref using the hashref value received by abc.cgi is a string of address but then i can't resolve this address so that i can use it as a hashref in abc.cgi. What should i do?
Please Sign up or sign in to vote.
8 Oct 2011
M. Danish Farman
4 alternatives  
I'd like to ask pros out for their opinion, as to what language to choose to begin my professional development career.I'm confused! It's somewhat weird but true!I must also tell them that I do have a background in C, Java, COBOL,Perl, and Python...What makes me feel this way is the...
Please Sign up or sign in to vote.
14 Oct 2011
ckulasekaran
2 alternatives  
Hi, I am newer in Perl and my first project is find and replace a particular tag in XML file. for example i want to find all and replace in sequence numbers for that . Thank you ....
Please Sign up or sign in to vote.
15 Oct 2011
André Kraak
Have a look at this: How can I find and replace text in XML using Perl?[^]
Please Sign up or sign in to vote.
19 Oct 2011
The_Real_Chubaka
1 alternative  
Hi,I have only been learning Perl for less than 2 weeks. I am a C++ programmer.I have attached a portion of the data below. The data is in file1.txt. I would like to move the data from file1.txt to file2.txt. But, I only want to keep the numbers.Eg: I want row 1 to look like this:1...
Please Sign up or sign in to vote.
30 Oct 2011
ckulasekaran
Dear Sir/Madam, Smoking: May increase, risk of CV effects, Urge patient to stop smoking, or, discuss, alternative therapy.Here in the above coding line for every occurrences of ' comma(,) ' the content should be replaced as below . What is exact coding line in PERL......
Please Sign up or sign in to vote.
2 Nov 2011
zh_huo
I need to use utf-8 as charset to display my country's words.However,I found EPP3 is not compatible with utf-8.So,my problem is that what I can to do,so EPP3 can be compatible with utf-8.Thank you!!
Please Sign up or sign in to vote.
4 Nov 2011
The_Real_Chubaka
1 alternative  
Hello,I posted this on Perlguru but, i have not gotten a reply yet.I' just hoping to get one here.Anyway, i have data (numbers) in a file data.txt.I would like to import it and use it as a matrix.ie: be able to use a matematical operation on only one row, or only one column. And...
Please Sign up or sign in to vote.
7 Nov 2011
The_Real_Chubaka
Hello,I just learned how to use PDL. The problem is that my data (matrix) is in an external file.How can i change change it into a PDL data structure?I tried the code below but, the values in $s are still ones.use PDL;use PDL::Matrix;use PDL::NiceSlice;use...
Please Sign up or sign in to vote.
8 Nov 2011
The_Real_Chubaka
1 alternative  
I already have my set of features.I have normalized them. The next step is to find the separability index.Does anyone know where i can find the implementation.I write perl code. But any other C-type language is also OK.Thank you.Herve
Please Sign up or sign in to vote.
17 Nov 2011
ANANTH P
hi, here is my code in that i had merged the files and saved to a new file , and guide me how to create a ini file and how to list the files using perl codeQuote:my $samplefolder = $ARGV[0];opendir (DIR,"$samplefolder") || die ("Can't open the input folder for reading");my (@files)...
Please Sign up or sign in to vote.
18 Nov 2011
ANANTH P
I am new in perl pls tell how to rearrange the merge file I want change the arrangement like file4.xml, file2.xml,file3.xml & file1.xml sample files: file1.xmlheading1first authorsdasdasda Methadone
Please Sign up or sign in to vote.
22 Nov 2011
Manish Kumar Namdev
1 alternative  
Hello friends,Please guide me I want to make a clear difference between Object Oriented Languages and Object Based Languages/I checked over the net where I found some information but they were clashing.LikeJavascript is an Object Oriented Programming and in another forum I found...
Please Sign up or sign in to vote.
22 Nov 2011
Sergey Alexandrovich Kryukov
First of all, read about the basics:http://en.wikipedia.org/wiki/Object-based_language[^],http://en.wikipedia.org/wiki/Object-oriented_programming[^].You may find that the notion of "object-based" is not well-defined. This is true. This notion came with some languages which cannot be...
Please Sign up or sign in to vote.
13 Dec 2011
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'...
Please Sign up or sign in to vote.
18 Dec 2011
DeepthiTanguturi
2 alternatives  
Whne i click a link left div,i want show that information in right div.How can i do that one.PLz send some sample........
Please Sign up or sign in to vote.
19 Dec 2011
Career Web Helper
First,Fill data in 1st Div Dynamically by using and then by using Javascript you can fill 2nd Div with new
Please Sign up or sign in to vote.
19 Dec 2011
Sarvesh Kumar Gupta
First call javascript function on click of link. in js function set innerHTML property of second div to value which you have to show.document.getElementById(div2).innerHTML = value;
Please Sign up or sign in to vote.
22 Dec 2011
Kevin Schaefer
Quickly summarize the secure log file on Linux systems to easily see who is trying to ssh to the server
Please Sign up or sign in to vote.
22 Dec 2011
spsathees
#!/usr/bin/per...
Please Sign up or sign in to vote.
22 Dec 2011
nilesh.d.mankar
2 alternatives  
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 =...
Please Sign up or sign in to vote.
6 Jan 2012
ckulasekaran
2 alternatives  
Hi, I want close the tags in hierarchical way.This is my input.Use Microsoft Windows accessibility Magnify the display Change the size of text and icons...
Please Sign up or sign in to vote.
5 Jan 2012
mahalatchumi
1 alternative  
Hi,I'm newbie to Perl,i want to close the book-part tag at the end of each chapter and i have n chapters,i.e)book-part should be close before the next chapter begin,i tried the below code but it couldn't show any changesif($str =~ /
Please Sign up or sign in to vote.
6 Jan 2012
Andreas Gieriet
The issue seems to be, that your "if" condition will never be met (wrong assumptions and/or too complicated?).Note: XML is a free format, i.e. the content may be spread over multiple lines.If you need to modify the whole XML file, then it's best to slurp in the whole file into one string...
Please Sign up or sign in to vote.
6 Jan 2012
Andreas Gieriet
Since my Solution 1 is not really applicable (the tags are not XML conformant), enclosed please find an alternative version in Perl.CheersAndi#!perluse strict;# file: { line NEWLINE } .# line: listitem | ANY_CHAR .# listitem: begin itemtext end .# begin: '
Please Sign up or sign in to vote.
9 Jan 2012
mahalatchumi
Hi,I've problem in multilevel tag closing,i want to close the tags form the inner level then come to close its outer levelUse Microsoft Windows accessibility options to: – Magnify the display – Change the size of text and icons...
Please Sign up or sign in to vote.
11 Jan 2012
ADubey87
#!C:\Perl\bin\...
Please Sign up or sign in to vote.
15 Jan 2012
nilesh.d.mankar
2 alternatives  
Hi Friends,I am trying to store the command prompt output in to the veriable.I am running some commands on command prompt which gives output in single value as well as in multiple values. I want to store those values into the array variable. But I dont know how to fetch the command prompt...
Please Sign up or sign in to vote.
16 Jan 2012
Prerak Patel
http://stackov...
Please Sign up or sign in to vote.
16 Jan 2012
Graham Breach
The simple way is to use backticks:$list = `ls -al`;- that will give you the command output in one variable. If you want it split into an array of lines:@list = split $/, `ls -alh`;
Please Sign up or sign in to vote.
16 Jan 2012
JunWoo Park
1 alternative  
Hello all,I wrote a java program which runs on my computer that uses RMI to connect to a remote computer and run a short vbs script. Both computers have Windows XP, and I am an administrator on my computer but I am only a user on the remote computer. So I have a triggering program on my...
Please Sign up or sign in to vote.
17 Aug 2012
WebMaster
3 alternatives  
I am looking for a Self service web based reset password- Active directoryCan somebody please advise me if this can be done or if there is some project example.Thanks in advance
Please Sign up or sign in to vote.
12 Mar 2012
Ganesan Senthilvel
You can use the below code to fetch the logged IN user ID from AD as: WindowsIdentity ident = WindowsIdentity.GetCurrent(); WindowsPrincipal user = new WindowsPrincipal(ident); string username = StripDomainFromUserName(user.Identity.Name); ...
Please Sign up or sign in to vote.
12 Mar 2012
Ganesan Senthilvel
As the next step, you can use the below code to reset AD password as:public string ResetPassword(bool reset) { string sPwd = _user.Properties["sAMAccountName"][0].ToString() + ".tmp"; //static password here int flags; if(reset) ...
Please Sign up or sign in to vote.
13 Mar 2012
rajeevakarv
Hi folks,I am practicing to report bugs to Bugzilla using XML file with an attachment. I am using bugzilla3 for this and using importxml.pl script for logging the bug.code for attachment is : 1 ...
Please Sign up or sign in to vote.
19 Mar 2012
Stefan_Lang
Apart from the outer circle turning and the claim that both circles stay in place (which is impossible), this site may be helpful:http://mathworld.wolfram.com/Hypocycloid.html[^]
Please Sign up or sign in to vote.
21 Mar 2012
ZurdoDev
The best language is the one your developer knows the best and your IT team knows how to implement the best.
Please Sign up or sign in to vote.
28 Mar 2012
raju_M
## Example of using SMS Matrix HTTP API in Perl## Sending Text-to-Speech messageuse LWP::UserAgent;use HTTP::Request::Common;my $ua = LWP::UserAgent->new();my $res = $ua->request( POST 'http://www.smsmatrix.com/matrix_tts', Content_Type =>...
Please Sign up or sign in to vote.
29 Mar 2012
Arvindabc
How to send enable password using expect i have written my code but having some issues in it .proc clearLine { conServerIp} { set password "lab" set enablepw "lab" set spwnid [ spawn telnet $conServerIp] expect { "Password:" { ...
Please Sign up or sign in to vote.
5 Apr 2012
wizardzz
You can use C++ without .NET. It predates .NET by a few decades. You also don't have to use Visual Studio for C++, or anything even created by Microsoft. You can choose from a range of IDE's.
Please Sign up or sign in to vote.
5 Apr 2012
Clifford Nelson
Pretty much stuck with C++. You can use Java also, but need to have Java installed, and to get the type of capability you see in .NET you will have to include add-ons that will also increase weight. Simplest is just C and live with a console application.
Please Sign up or sign in to vote.
5 Apr 2012
lewax00
Finding a language that requires no additional packages is pretty hard, the only solution I can think of off the top of my head would be writing HTML/Javascript apps that are run in a browser (as long as it's all client side code there's no reason you couldn't distribute an app this way, but...
Please Sign up or sign in to vote.
12 Apr 2012
Chris Losinger
that statement doesn't mean anything.are you sure it doesn't say "Modulate the answer by 1007" ?
Please Sign up or sign in to vote.
12 Apr 2012
lewax00
Shot in the dark here..but I assume it meant modulo not module, in that case that would be the operation used to find the remainder from division, in many languages "%" is used for this, so in your case something along the lines ofsomeNumber % 1007That's the best I can offer with what litte...
Please Sign up or sign in to vote.
12 Apr 2012
Andreas Gieriet
Brute force approach (let the computer calculate the problem as stated) for the sample data results in:count = 25168 % 1007 = 1000Hence, I dare to state that "Module" means modulo.CheersAndiPS: The code (a quick and dense hack to get going):static int Loop(int x, List v,...
Please Sign up or sign in to vote.
12 Apr 2012
SALIL GAURAV
here is my code to above problem:.....#include#includetypedef struct com{ int a; int b;}com;int comp(com *a,int m)//this function checks the repeated pair and count them{ int i=0; int j=0; int c=0; for(j=0;j
Please Sign up or sign in to vote.
12 Apr 2012
Andreas Gieriet
Now the C++ version of Solution#3 above:#include #include #include using namespace std;class Requirements{private: class Req { public: Req(): _x(0), _y(0) {} Req(int x, int y): _x(x), _y(y) {} int x() { return _x; } int y() {...
Please Sign up or sign in to vote.
19 Apr 2012
loctrice
It's been a while since I did xml with perl. When I learned to do it, we did something like this:#!/usr/bin/perl#use xml parseruse XML::Parser;#set up the parser obj$xp = new XML::Parser();$xp->setHandlers(Start=> \&start,End=> \&end, Char => \&cdata);#get some use...
Please Sign up or sign in to vote.
21 Apr 2012
phil.o
Maybe you could try as described here[^].
Please Sign up or sign in to vote.
11 May 2012
Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
Please Sign up or sign in to vote.
20 May 2012
RoboAlex
1 alternative  
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
Please Sign up or sign in to vote.
20 May 2012
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...
Please Sign up or sign in to vote.
21 May 2012
jonty001
I need some help. I want to execute a perl script on the server side. it is ti be executed from the client side and the results stored on server side and displayed on web page at the client side. The client will request a jpg file to download and then the script will measure the time it takes to...
Please Sign up or sign in to vote.
31 May 2012
Ashokraj29
1 alternative  
Hi,I want to move a file from a linux to FTP.Problem is the filename.let us consider filename is abc.txt .. After processing it will become as xxxxx_abc.txt-2012-05-30-1625The thing is i want to pick the processed file with help of its orginal filename and to put it in FTP using...
Please Sign up or sign in to vote.
13 Jun 2012
neeraj24may
1 alternative  
hi, i am getting this error while fetching data from mysql. can anybody explain me this error and how to resolve it as i m novice in perl programming
Please Sign up or sign in to vote.
14 Jun 2012
Farhan Ghumra
check this[^] out may be helpful This also[^]
Please Sign up or sign in to vote.
23 Jun 2012
Member 4426022
1 alternative  
Hi,How I can redirect the stdout (NOT the return value) of system("valgrind --version")to a variable $resultStr e.g. the $resultStr should contain "valgrind-3.7.0" ?Your help is highly appreciated.//W
Please Sign up or sign in to vote.
27 Jun 2012
Ashokraj29
1 alternative  
my $dbHit= $DB->prepare($db_statement); $dbHit->execute(); my $isHoliday = 'f'; while (my @key=$dbHit->fetchrow()){ my $account = padZero($key[0],9); my $tdate = $key[1]; my $code = $key[3]; my $item = $key[2]; my $default = 'CMB';}The problem is I'm...
Please Sign up or sign in to vote.
29 Jun 2012
Uilleam
Well how hard would it be to just try it?Another way to look at it is: how would returning zero rows be different to fetchrow() than the second iteration if there was only one row returned? Either way you get an empty list and the while ends (which is the point of this structure). So, if you...
Please Sign up or sign in to vote.
29 Jun 2012
Uilleam
You want to backquote that - see Quote Like Operators, and look at qx/STRING/ and `STRING`.
Please Sign up or sign in to vote.
8 Jul 2012
Gssankar
2 alternatives  
HiIs there any way to check whether there is any subfolder exist inside a parent folder. I would like to do this in Perl?
Please Sign up or sign in to vote.
8 Jul 2012
perilbrain
http://perlmeme.org/faqs/file_io/directory_listing.html[^]Alsohttp://perldoc.perl.org/functions/readdir.html[^]http://perldoc.perl.org/functions/opendir.html[^]
Please Sign up or sign in to vote.
11 Jul 2012
Gssankar
1 alternative  
HiHow to convert the px to em and pt to em. Is there is any formula.RegardsSiva
Please Sign up or sign in to vote.
12 Jul 2012
Gssankar
hihow to get the css values in the css class using regex.Thanks Siva
Please Sign up or sign in to vote.
24 Jul 2012
Gssankar
HiHow to wait till the page is loaded and get the contents of the page in perlThanksSivasankaran G
Please Sign up or sign in to vote.
25 Jul 2012
Faez Shingeri
1 alternative  
Hi,I am a newbie to Perl and have written a code to search for the word "PERFORM" at the start of a line in a file and the corresponding line should be printed in another file. Also I need to store the string after PERFORM in an arrayuse strict; use warnings; open FILE1,...
Please Sign up or sign in to vote.
5 Aug 2012
Faez Shingeri
1 alternative  
Hi,I am unable to use the Perl packageuse List::MoreUtils qw/ uniq /;for the "uniq" functionality.I tried including the path also by right- clicking in the properties of my project and giving the List module path but in vain.I get the below error.Compilation failed in...
Please Sign up or sign in to vote.
8 Aug 2012
Uilleam
You're talking about in-place editing, for which Perl has a special idiom: the -i command line switch (for one-liners) or the $^I special variable for larger programs. This is a lot easier and safer than using read-write mode for text files. Since you didn't provide all the config information...
Please Sign up or sign in to vote.
13 Aug 2012
Faez Shingeri
Hi,I am unable to replace all the array1 elements with corresponding array2 elements in a file. Here is my codeopen FILE1, "){ chomp($_); $_ =~ s/@array1/@array2/g; push(@newlines,$_);} close...
Please Sign up or sign in to vote.
15 Aug 2012
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...
Please Sign up or sign in to vote.
9 Sep 2012
Member 9416338
1 alternative  
Hi,I am trying to retrieve mail addresses from a file and storing each of them in a variable. I wish to send mail to these email addresses using perl. I am using senditquiet for that purpose. But doing it in perl I am using the system command. But it shows the below error:The specified...
Please Sign up or sign in to vote.
9 Sep 2012
jschell
senditquiet -s smtp.gmail.com -port 587 -u myMailId@gmail.com -p my_password -f mail_id/@gmail.com -t $mail_id@gmail.com -protocol ssl -files C:\ComboFix.txtThere are all sorts of special characters in that.And a variable that you want to resolve.Because of the latter - you MUST use...
Please Sign up or sign in to vote.
21 Sep 2012
Sandeep Mewara
Here, refer: Migration Guide: Moving from v2.3 APIs to v2.4 & v3.0[^]
Please Sign up or sign in to vote.
24 Sep 2012
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#.
Please Sign up or sign in to vote.
30 Sep 2012
Maverick143
mv -dR SOURCE DESTINATIONThanks,-Mangesh
Please Sign up or sign in to vote.
30 Sep 2012
Maverick143
use File::Find;OR#find /parent/directory/ -type dmy @dirs = split(/\n/,`find /from/this/place/on -type d`);
Please Sign up or sign in to vote.
30 Nov 2012
harish.puramsetti
1 alternative  
Can any one help me for converting the below code of Perl to C#?use strict;my $usage =
Please Sign up or sign in to vote.
30 Nov 2012
codeninja-C#
Hi,You can easily do this task with c# without converting perl script. At first understand the logic of above code.Your output shows that it generate all the possibilities of color,car,time which is based on your test cases and text.txt file.--SJ
Please Sign up or sign in to vote.
8 Dec 2012
D Sipe
This may not be the right place to request something like this, but I'm hoping at the very least I can get some direction.We currently have a variety of spreadsheets and .bat files we run in preparation for major deployments. It's quite tedious. I would LOVE to be able to get a tool created...
Please Sign up or sign in to vote.
31 Dec 2012
geeks8
1 alternative  
Hi Folks,I am looking for a Perl script. And Here are my requirements:- Download files from the FTP server on the local machine and create these all files entries under an empty database.- Now next time when script will run it should download only the added andmodified files from...
Please Sign up or sign in to vote.
31 Dec 2012
Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
Please Sign up or sign in to vote.
14 Jan 2013
Lighter Joul
Good days every body,I had used perl with PDF::Table to create a table in PDF.However, I found that module just for creating a text table in PDF, and I can not create a table both with text and image.Can you give me some hints about this? or what module in Perl can realize...
Please Sign up or sign in to vote.
16 Jan 2013
paiyu
2 alternatives  
which language is pure object oriented language?
Please Sign up or sign in to vote.
16 Jan 2013
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...
Please Sign up or sign in to vote.
16 Jan 2013
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,...
Please Sign up or sign in to vote.
18 Jan 2013
Member 9767982
1 alternative  
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...
Please Sign up or sign in to vote.
25 Feb 2013
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...
Please Sign up or sign in to vote.
23 Feb 2013
mrsh66
1 alternative  
how can i get my own web language like php and Perl and HTML and other web language how can develop my own web language please i wan 1- reference in that purpose.2- book in that purpose.3- articles in that purpose.4- other. or anything can help me in my own project thanks for...
Please Sign up or sign in to vote.
2 Mar 2013
inventiveman
1 alternative  
Hi,I'm looking for some help in selecting an application or fast language to manipulate pixels in a number of specific images described below.The images are very large (3264x2448px or more) and in RAW format so processing speed will probably be a priority. To add difficulty to the...
Please Sign up or sign in to vote.
6 Mar 2013
Member 9470684
Hi, I want to display the content of a directory (directory contains text files only) in a dropdown combobox or list box in an html page.so the listbox or dropdown box will contain the file names only.i can use Perl script if needed.. i am using Unix server. Is there a way to do this?? plz if...
Please Sign up or sign in to vote.
16 Mar 2013
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...
Please Sign up or sign in to vote.
17 Mar 2013
ali_crash
2 alternatives  
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...
Please Sign up or sign in to vote.
19 Mar 2013
Member 9470684
Hi friends,I Have a html page in which der is a dropdown combobox which contains some value. when a person selects a value n press submit button, a perl program is called in which i have to read the value selected in the combobox in a local variable.html code: ...
Please Sign up or sign in to vote.
20 Mar 2013
Richard MacCutchan
Some C# samples[^].
Please Sign up or sign in to vote.
26 Apr 2013
Utkarsh Agarwal
Hi All,Currently we are having below version of the Sybase database server.Adaptive Server Enterprise/11.5.1.2/P/HP9000-800/HP-UX 10.0We are going to upgrade it to the below versionAdaptive Server Enterprise/15.5/EBF 20632 SMP ESD#5.2/P/Sun_svr4/OS 5.8/asear155/2602/64-bitThe old...
Please Sign up or sign in to vote.
8 May 2013
virudinesh
hai.. am handling text file . if update 5 lines , remaining lines will push one array and update line is push one arry ? if possible to do like this?
Please Sign up or sign in to vote.
13 May 2013
s v b raju
Hi, I am try to get the list items from share point server site using perl script.i am write the script but give the error "401 Unauthorized". please help to solve this problem. i am write script below use LWP::UserAgent; use LWP::Debug; use Data::Dumper; use SOAP::Lite...
Please Sign up or sign in to vote.
22 May 2013
User-10031173
1 alternative  
#!/usr/bin/perl -wuse strict;use CGI qw(:standard);use CGI::Carp qw(warningsToBrowser fatalsToBrowser);print header;print start_html("Environment");foreach my $key (sort(keys(%ENV))) {print "$key = $ENV{$key}\n";}print end_html;how can write same logic in...
Please Sign up or sign in to vote.
22 May 2013
Richard MacCutchan
Something likeimport java.util.Map;// ... Map env = System.getenv(); System.out.format("Environment variables:%n"); for (String envName : env.keySet()) { System.out.format("\t%s=%s%n", envName, env.get(envName)); }
Please Sign up or sign in to vote.
3 Jun 2013
Maciej Los
I would suggest you to ask this question on http://www.codeproject.com/Forums/1688234/Windows-8-WinRT-Metro.aspx[^] forum.QA forum is used to get Quick Answer on programming issue.
Please Sign up or sign in to vote.
6 Jun 2013
suresh jaladi
1 alternative  
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 =...
Please Sign up or sign in to vote.
6 Jun 2013
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,
Please Sign up or sign in to vote.
16 Jul 2013
suresh jaladi
hi,i am trying to install a perl module on a machine which don't have internet access.i am trying with PPM inorder to install the perl modules, and i have followed all steps which are mentioned in the following linkhttp://www.perl.com/pub/2007/01/11/painless-ppm.html[^]but still i am...
Please Sign up or sign in to vote.
24 Aug 2013
Member 9330747
1 alternative  
Hello All,I'm executing Stored Proc in Sybase in the following way. It's executing fine. I've to print the OUT value.DECLARE @MyCount INTDECLARE @MyDate DATETIME EXEC proc_MyProcName_update @MyDate OUT, @MyCount OUTSELECT @MyCount, @MyDateBut somehow I'm unable to run this in...
Please Sign up or sign in to vote.
26 Aug 2013
_Asif_
Check this linkPass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure[^]
Please Sign up or sign in to vote.
30 Aug 2013
Mehul_Chaudhari
1 alternative  
Dear All,We are using prepared statement to retrieve data.In MySql we receive proper result but same result is in very different format when we receive it on PHP page.Please share some information how can we recieve result in text format on php side.After reviewing various...
Please Sign up or sign in to vote.
30 Aug 2013
Richard MacCutchan
I think you may have misunderstood something. Take a look at http://php.net/manual/en/mysqli.quickstart.prepared-statements.php[^].
Please Sign up or sign in to vote.
9 Sep 2013
Member 8576081
1 alternative  
I am trying to return an array from a subroutine and use it another subroutine. It prints nothing when I do this. #!/usr/bin/perl use strict; use warnings; # Subroutine prototypes sub getArray(); # Get array sub dispArray { my @one =...
Please Sign up or sign in to vote.
9 Sep 2013
E.F. Nijboer
Try to avoid prototypes and the following will yield the result you want every time by also checking what the caller wants. #!/usr/bin/perl use strict; use warnings; sub getArray() { my @array1 = ("a", "b", "c", "d"); return @array1 if...
Please Sign up or sign in to vote.
10 Sep 2013
Member 10265811
2 alternatives  
Hi to calculate productivity. My agents takes 35 calls with an aht of 6 mins (including hold, acd and acw time) and for rest of the time they are sitting n waiting for calls
Please Sign up or sign in to vote.
10 Sep 2013
Ron Beyer
Utilized time / available time = utilization ratioSo lets say they have an 8 hour day, during that day they get a 1 hour lunch and 2 15 minute breaks, so they have an available time if 6.5 hours. If they answer 35 calls at 6 minutes a piece that is 210 minutes or 3.5 hours. 3.5/6.5 = 54%
Please Sign up or sign in to vote.
10 Sep 2013
Member 10265811
Thanks a lot Ron Beyer. It helped me and it cleared my doubt. But i have one more quick question for you. Now how will u calculate occupancy based on the above scenario (just breaking up the stats (4.5 mins Talktime, 1 min hold time and .5 min acw) and the difference between productivity and...
Please Sign up or sign in to vote.
27 Sep 2013
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...
Please Sign up or sign in to vote.
28 Sep 2013
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...