Would it be possible to integrate Python (and/or Perl) and Ruby? I've looked at http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python/doc/ and http://code.google.com/p/ruby-perl/ , but they both seem rather outdated.
Has someone generated a Ruby interface for Python's C API?
Edit: Python can be integrated with many other languages ac...
I have hack I need to employ under these conditions:
-It's the last page of data.
-It's not the first page, either.
-There's not a page-size-even number of data items.
So I tried this code:
my $use_hack =
$last_page_number == $current_page_number and
$page_number != 1 and
$total_items % $items_per_page != 0;
And I keep gett...
I define a method inside a parametrized role that needs to create a new class at run time
using Moose::Meta::Class->create and apply that exact parametrized role to it. I am also making a new method for that role using
$new_class->meta->add_method( some_name => sub {
my ($self) = @_;
...
})
inside the sub {...} I want to access a...
After creating a metaclass using Moose::Meta::Class->create, how do I instantiate a real Moose class with that class as a metaclass?
(I need to create the metaclass also because I also want to apply some roles to it.)
...
I have a problem with the system function. I want to store the system functions output to a variable.
For example,
system("ls");
Here I want all the file names in the current directory to store in a variable. I know that I can do this by redirecting the output into a file and read from that and store that to a variable. But I want a ...
Why is there no error issued by strict:
use strict;
$a = $a + 1;
...
I have a file of 1000 lines, each line has 2 words, seperated by a space. How can I print each line only if the last word length is greater than 7 chars? Can I use awk RLENGTH? is there an easy way in perl?
...
If i do this:
GetOptions(
'u=s' => \$in_username,
'r=i' => \$in_readonly,
'b=i' => \$in_backup
);
exit usage() unless $in_username && $in_readonly && $in_backup;
and call the program like this:
./app.pl -u david -r 12 -b 0
it always results in calling usage(), so obviously the 0 is not seen as an integer value...
I'm continuing to work out of an outdated bioinformatics book and I'm attempting to use the XML::Smart Module.
I suspect the module's methods have changed over the course of 6 years and I'm inexperienced with perl to troubleshoot from cpan source. The commented out code proves the ncbi.gov query functions, I'm having trouble with the '...
Line directives (#line) are used to reconfigure perl's idea of the current filename and line number. When is this required to get right filename and line number (in an error message)?
...
I recently saw someone with a T-shirt with some Perl code on the back. I took a photograph of it and cropped out the code:
Next I tried to extract the code from the image via OCR, so I installed Tesseract OCR and the Python bindings for it, pytesser.
Pytesser only works on TIFF images, so I converted the image in Gimp and entered the...
Does anyone know how to prepare data to plot a CDF (I have a bunch of floating point numbers)? I was planning on using gnuplot and on first look, the Statistics::Descriptive module seemed the best fit but looks like I might need some help here.
...
I have never used DBIx::Class until today, so I'm completely new at it.
I'm not sure if this is possible or not, but basically I have a table in my SQLite database that has a timestamp column in it. The default value for the timestamp column is "CURRENT_TIMESTAMP". SQLite stores this in the GMT timezone, but my server is in the CDT ti...
I am new with Perl. I'm following a bioinformatics webapi and I'm attempting to simply display the value stored in $result. My print "$result\n"; command doesn't appear to be functioning. What are some possibilities as to what is going on here?
# #!/usr/local/bin/perl
use strict;
# 1. include SOAP Lite
use SOAP::Lite;
# 2. specifies...
I want to delete from many files each instance of a paragraph. I call paragraph a sequence of lines.
For example:
my first line
my second line
my third line
the fourth
5th and last
the problem is that I only want to delete them when they appear as a group. For example, if my first line appears alone I don't want to delete it.
...
I'm trying to get perl running under on my Apache 2 macports install. I'm hoping an experienced perl geek can help me out. I've...
Got Apache running just dandy. Macports installed it with perl5 placeholder and perl5.8.9.
Installed mod_perl2.
Run the script to configure httpd.conf.
Restarted apache.
Written the following test script in...
Are there any algorithms available for analyzing the complexity of an image? Basically I'm writing a Perl script that will use the system() function to launch MPlayer in the background to generate 10 to 20 screenshots for the input video file and I'd like it to be able to discard any simple images such as a shot of the sky, or a black ba...
Can you please tell me the steps I need to follow in order to obtain an account on CPAN? I'd like to contribute some modules.
A while back, I tried to create an account, and I remember I got back a mail containing some of this text:
The following links are only valid for PAUSE maintainers: and there were 2 links :
Registration form wi...
What is the best way to achieve sscanf-like functionality in perl?
I am looking now looking at the sscanf module,
Which is better,
Option-1: Going sscanf way?
Option-2: Regex way? [I am a beginner when it comes to Regex]
...
I was wondering if it was possible to call a function inside a perl here doc
sub Function
{
}
print<<HERE;
Function()
HERE
...