switcherswitcherswitcherswitcher

User login

Who's online

There are currently 0 users and 1 guest online.

Who's new

  • vsn3480
  • fengzhixuan
  • caseybergman
  • tomas81
  • raju_dharna

RSS Feeds

Technorati

Perl Programming

Undefined variable error driving me insane

Hi guys,

Hoping that one of you can help me out with this error on the following script. It complains about the use of an unitialized value $sorted in string eq at line 84 (I've stuck a comment on the end of the line so you can find it easier), but I can't work out why the hell this isn't working. Any ideas would be greatly appreciated.

Cheers,
Mark QT.


#!/usr/bin/perl -w
@sections = ("BP");
#@sections = ("BP","CC","MF","KEGG");
$mouse1 = "AJ3";
$mouse2 = "AJ7";
open(OUTFILE, ">$mouse1 vs $mouse2.txt");
foreach $section(@sections){
$file1 ="$mouse1"."_"."$section".".jsp";
open(HTMLFILE1, $file1) || die "cannot open first HTML file";
@htmltext1 = ;
$i = 0;
$htmlstring1 = "";
foreach $htmltext1(@htmltext1){

Microarray modules released on CPAN

Time for an advertisement..... not self-publicity, just hoping it might be useful to someone here.

User defined action(s)

Hi folks,

I am trying to do something that I believe is possible but may be slightly above my station :(

I have a method in a class which generates image maps from Gnuplot graphs where each data point on the graph is clickable. Trouble is, at present its default behaviour is to just pass the x and y values for the data point back to the script that calls it (the current file). I would like a situation where I can let the user specify the action (s)he would like to take (such as CSS or Javascript mouseOver action).

My current thinking is to have some sort of "action" attribute which expects a CODE reference detailing the action to take. However I am not quite sure how to implement this.

Does anyone have any ideas ... or am I making things too complicated here?

accessing genbank database remotely

Hi
I am new to perl and bioperl programming. I have a set of accession nos in a text file. I am trying to open that file and access remote genbank database using bioperl. Even though I am familiar with the second part of my problem, I'm stuck in the first part. I have to open a file with a list of acc nos and then access genbank using get_Seq_by_acc method of bioperl. Can anyone help to figure out this problem. THX.
Gopu

How do I totally remove a package?

So my previous post showed how you can get a list of perl modules installed on your local machine. This script takes the ID of one of those modules (supplied by you, not at random!) and deletes it totally. There is no comeback from using this script other than a fresh install of that module.

#!/usr/bin/perl -w

use ExtUtils::Packlist;
use ExtUtils::Installed;

$ARGV[0] || die "Usage: $0 Module::Name\n";

$mod = $ARGV[0];

my $inst = ExtUtils::Installed->new();

foreach $item (sort($inst->files($mod))) {
print "removing :: $item\n";
unlink $item;

How do I know what modules I have installed?

So you use lots of perl modules. You may want to get a list of these - maybe to install them all on another computer. Well this is possible using perl. The following code will return the name of all modules and their version number. In the next post I will show you how to remove modules from your machine.

#!/usr/bin/perl
use ExtUtils::Installed;
my $inst = ExtUtils::Installed->new();
foreach $mod ($inst->modules()) {
    $version = $inst->version($mod) || '???';
    print "$mod -- $version\n";
}

DBIx-Class help needed to find_or_create()

hi all,

i have been trying without much success to use the CPAN module DBIx-Class. at the moment i'm trying to use the find_or_create() to insert data into my database.

I have provided two examples in a zip file:

dbix-class-library.pl
try-loading.pl

in dbix-class-library i have no problems as i'm only inserting new data into one column. i am also able to insert into a second column using a foreign key. however, i cannot seem to update multiple columns in the manner i require.

Installing Perl Modules on Mac OS 10.4

Hey everyone,
I'm trying to install some perl modules on Mac os using cpan from the command line..I get this errors for modules found but can't be installed:

Running make install
mkdir /usr/local/man/man3: Permission denied at /System/Library/Perl/5.8.6/ExtUtils/Install.pm line 112
make: *** [pure_site_install] Error 255
  /usr/bin/make install  -- NOT OK

I've got no clue as what to do next. Thanks for any light shed on this matter.

test data type

hi folks,

i am trying to perform tests on some variables and determine what kind of (SQL) data type it is.

basically, if i have the following values:

nelo
26
http://www.bixonline.co.uk
15th Dec 2006
3.142

i want to be able to say something like:

nelo => text
26 => 1nteger
http://www.bixonline.co.uk => varchar
15th Dec 2006 => date
3.142 => float

i imagine i could go ahead trying to write the regex to find any of the above (and other) data types but i was just wondering if anyone has come across something like that before ... perhaps a Perl module or even a Java class! i've had little luck :(

How to Begin BIOPERL

Hello
i started working in Perl ....now i want to use Bioperl...
can any one suggest how to move forward.................and use bioperl

thanks & regards
Manindra

Syndicate content