Questions for perl


How can I select a value matching my input from a TypeAhead control using WWW::Mechanize?

So ordinarily the element I want to pick from a list would be populated on a page and I'd just find it and pick it. But I'm dealing with a control that doesn't populate list elements until some in...

simple form validation in dancer/perl

I am trying to do a simple form validation in perl dancer but I was wondering what would be the best way to validate simple parameters (e.g. field cannot be empty, validity of the email, minimum ...

Translating a Perl reference to OO PHP?

So I tripped across another oddity in translating the old developers Perl script into

Why does the TAP::Harness Perl module have a “NotBuild.PL” file?

The TAP::Harness 3.23 tarball includes a NotBuild.PL file (and no Build.PL file), but the README specifically states:

perl: capturing STDOUT- logfile ends up binary

I wrote a script that feeds data into an exe program called ctffind. The exe program outputs a bunch of data to the screen which I'm trying to capture in a logfile.

Bulk File Processing in Perl

I have a perl program which is taking huge time.Can someone suggest the option for tuning.

how do I use a conditional in this one liner?

I have an input file with 3 columns, and I wanted to print lines where the 3rd column hasn't been duplicated. so if my input data looks like this:

Invoking Perl debugger so that it runs until first breakpoint

When I invoke my Perl debugger with perl -d, the debugger starts, but it does not execute any code until I press n (next) or c (continue).

Scripting language choice for initial performance

I have a small lightweight application that is used as part of a larger solution. Currently it is written in C but I am looking to rewrite it using a cross-platform scripting language. The solution...

perl : unmatched ) in regex error

I'm no perl programmer, so I just need this simple script to run:

How can I prevent database being written to again when the browser does a reload/back?

I'm putting together a small web app that writes to a database (Perl CGI & MySQL). The CGI script takes some info from a form and writes it to a database. I notice, however, that if I hit 'R...

how to eval regular expression with embedded perl code

So I tested out a regular expression that utilizes the experimental embedded code features. My tests worked, so I expounded upon it to do a more sophisticated script, but ran into errors. I trace...

Perl::CGI Redirect with a Parameter and Access it in the New Page

In PHP it is very common to redirect to a new URL and pass along information such as a 'username.'

How can I prevent my perl script from terminating if an exception is thrown in a module it uses?

I have a perl script, using standard-as-dirt Net::HTTP code, and perl 5.8.8.

How to use fork() in Perl?

I have hundreds of file names in an array. I want to create a child process for every 4 files in the array, and have that child do some stuff to each of those 4 files. (So with 100 files, I'll crea...

Why we can not use “le” in for loop and can use in “if condition”

I've made this program as a beginner. Need to clarify something!

PHP equivelant of Perl line?

Can someone tell me if I'm right with this? I'm trying to port a fairly massive

How can I find the newest created file in a directory?

Is there an elegant way in Perl to find the newest file in a directory (newest by modification date)?

How important is it to indicate if a class implements an interface in Perl?

I've been discussing a code style issue with a friend. We have a series of packages that implement an interface by returning a specific type of value via a named subroutine. For example:

How can I modify Windows NTFS permissions in Perl?

I'm using ActiveState Perl on Windows Server 2003.

How to control timing of buffer flushing in Perl

How does exert more control on buffering in Perl? I know that I can use autoflush to flush the buffer immediately, or I can do nothing and let Perl flush when it feels like it.

What should I teach a beginning Perl programmer?

I am going to spend 30 minutes teaching Perl to an experienced programmer. The best way to learn Perl is by writing code. In addition to CPAN, what would you show a programmer so they would under...

How do you map regex string replacement values ($1,$2 etc) to a hash?

my (@keys,@values) = ($text =~ /\{IS\:([a-zA-Z0-9_-]+)\}(.*)\{\\IS\:([a-zA-Z0-9_-]+)\}/g);

Regular expression for matching \n and space

I am trying to use regular expression within my perl script to parse a file to match:

How to access sybase with PERL

Here is what I have so far. I can not create the db connection.

Perl: How to stop File::Find entering directory recursively?

I was looking at Perl's File::Find module and tried it in the following way:

Delete ClearCase Views Script

(This is a repost of a deleted question) (on request)

Perl Archive::Tar

I want to archive all txt files with File::Find, delete the source files and remove empty directories.

What does this Perl conditional do?

I'm trying to understand a particular Perl code from vcake. Usually I find my way around in Perl but the following statement baffles me. I suspect that this is simply an error but I'm not completely

How to read picture/image from word document using Win32::OLE in perl

Using Win32::OLE i am able to read tables, paragraphs from word document. But i want to read picture/image from word document, is there any function to get pictures ?

perl automatic module loading like in php

I am creating a bigger application in Perl, and I am wondering whether something like class autoloading similar to php’s can be done in Perl?

How to cleanup threads once they have finished in Perl?

I have a Perl script that launches threads while a certain expression is verified.

Man pages with MakeMaker

I wrote some man pages which I'd like to install from a MakeMaker.

How can I upload a file using Catalyst?

I am working on an internal web based application for storing and cataloging photos. How should I retrieve, and save these files to the server?

Why did Perl say() not append newline in FCGI mode?

I have a strange behaviour with Perl's say function in FCGI mode. Newlines won't be append. Why does this happen?

ftp download completes, but unzip says otherwise

I ran into a bizzarre error on linux:

How to POST additional parameters to editurl?

I've spent several hours looking at examples and docs trying to figure out how to POST additional parameters to editurl, and have yet to figure this out. I'm using Perl Catalyst.

Can't locate in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5

I tried to install some modules to a new server (fedora core 18) but I'm betting this error:

How to monitor remote Linux machines and retrieve installed software in Perl?

I have a couple of Perl scripts that allow me to monitor remote Windows machinses through WMI. Right now I can check CPU usage, Memory usage, Disk usage and Installed Software. But what if I want t...

How can I append the name of a file to end of each line in that file?

I need to do the following for hundreds of files:

Curly braces for a hash

Which structure is created as following in Perl?

Perl - determining the intersection of several numeric ranges

I would like to be able to load long list of positive integer ranges and create a new "summary" range list that is the union of the intersections of each pairs of ranges. And, I want to do this in ...

Perl, check if pair exists in hash of hashes

In Perl, I have a hash of hashes created with a loop similar to the following

Regular Expression (PHP/Perl) Backreferences

I want to match strings of the form:

How to deserialize Perl Data::Dumper output in PHP

I have a result of export variable in Perl like this string:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.