I'm backing up my Flickr pics locally using a Perl script and the Net::Flickr::Backup module. This pulls down the original picture, a thumbnail, and the associated metadata (title, tags etc) in a RDF-XML file.
I'd like to extract a subset of this metadata so I can generate a "poor man's Flickr" HTML page. This should display the thumbna...
I'm writing code that runs all sorts of external commands as well as various filesystem commands that can fail.
Is there any module that can save me the trouble of adding or die to anything that can fail?
I'd like to be able to wrap the following in something so that instead of:
mkdir $dirname or die "can't create directory $dirname"...
I want to sort out all APIs in the following text file:
DLL Name: msvcrt.dll
...
DLL Name: msvcrt.dll
...
DLL Name: KERNEL32.dll
...
DLL Name: WSOCK32.DLL
I thought of something like
$infostring = lc($infostring);
while ($infostring =~ /dll name:/g)
{
print "found dll\n";
}
the only problem is, how to get the actual dll names or a...
I'm looking for a general-purpose module to take the drudgery out of validating subroutine and method arguments. I've scanned through various possibilities on CPAN: Params::Validate, Params::Smart, Getargs::Mixed, Getargs::Long, and a few others.
Any information regarding pros and cons of these or other modules would be appreciated. Tha...
I need to print relatively complex layouts to networked/shared printers with Perl and I haven't had any luck finding modules or examples to help me in the task. Does anyone have any links that could help me out?
I presume that what I want to do will work as Postscript.
update: Ok, I don't really need help with how to generate PDF or P...
I'm writing a Cocoa application in Objective-C, and I would like to be able to incorporate Markdown. The user will enter text in Markdown syntax, click an "export" button, and the program will output a file of XHTML.
It seems like there are a lot of options, though. I could use one of the C/C++ implementations, I could run the Perl scri...
I have had numerous headaches trying to get the MySQL APIs for Perl and Python working on my 64 bit Macbook Pro (Leopard). I installed the 64 bit version of MySQL, but Googling around now I have the impression that this could be the source of my pain. None of the various blogs and SO answers quite seem to work (for example here on SO)
...
When I try to get a file from somewhere Internet, for example ,http::/www.aaa.com/bbb.tar, everything goes smoothly. When I use lwp-download to get the same file, the app just hangs.
After some troubleshooting, I realized that it is because a proxy has been set for Firefox that makes it work.
How do I configure an HTTP proxy for lwp-...
I am creating a website and done with some HTML stuff, but I am thinking to create site using CGI and Perl scripting. I don't have much idea on CGI scripting. Can anyone please suggest me how to create a CGI script and how to create web pages with that?
...
How can I declare a class variable as floating point in Moose?
My (fictional) sample below produces errors for "Real", "Number" etc ... "Str" works but defeats the purpose .. searching/Google doesn't help, since I can't hit the correct search terms...
PROBLEM.pm
package PROBLEM;
use strict;
use warnings;
use Moose;
has 'PROBLEM'=> ...
My issue is related to using fork() within Perl code.
I wish to fork a new process and capture its PID and return it back to the callee program. Is there some command in Perl which would make this possible?
...
I have some URLs like http://anytext.a.abs.com
In these, 'anytext' is the data that is dynamic. Rest of the URL will remain same in every case.
I'm using the following code:
$url = "http://anytext.a.abs.com";
my $request = new HTTP::Request 'GET', $url;
my $response = $ua->request($request);
if ($response->is_success)
...
What is the difference between these two operators? Specifically, what difference in $a will lead to different behavior between the two?
$a =~ /^pattern$/
$a eq 'pattern'
...
I am trying to write a script that will parse a local file and upload its contents to a MySQL database. Right now, I am thinking that a batch script that runs a Perl script would work, but am not sure if this is the best method of accomplishing this.
In addition, I would like this script to run immediately when the data file is added to...
I am trying to install DBD::mysql and I am getting thousands of warnings and errors when I install like this:
perl -MCPAN -e 'install DBD::mysql'
The errors are like:
dbdimp.c:3215 error: 'imp_sth_t' has no member named 'warning_count'
Then at the end it says:
make had returned a bad status, install seems impossible
This also fa...
option A:
print $fh $hr->{'something'}, "|", $hr->{'somethingelse'}, "\n";
option B:
print $fh $hr->{'something'} . "|" . $hr->{'somethingelse'} . "\n";
...
The following Perl code ..
if ($^O eq "MSWin32") {
use Win32;
.. do windows specific stuff ..
}
.. works under Windows, but fails to run under al...
I have data that looks like this:
my @homopol = (
["T","C","CC","G"], # part1
["T","TT","C","G","A"], #part2
["C","CCC","G"], #part3 ...upto part K=~50
);
my @prob = ([1.00,0.63,0.002,1.00,0.83],
[0.72,0.03,1.00, 0.85,1.00],
...
My backend program generates some XML data and sends them to the client.
The backend response is like this:
print $cgi->header("Content-type: text/xml;charset=utf-8");
print "<?xml version='1.0' encoding = 'utf-8'?>";
< correct XML data goes here >
When I try to visualize the sent XML in Firefox, It gets the whole thing and everythin...