how to search for intervals in multiple columns?

2004-10-28 Thread Martin A. Hansen
hi i have a dataset consisting of an array of arrays. $data = [ [q_beg1, q_end1, s_beg1, s_end1] [q_beg2, q_end2, s_beg2, s_end2] [q_beg3, q_end3, s_beg3, s_end3] ... ] q_beg, q_end, s_beg, s_end are all integers. now, i would like to find all rows where q_beg and q_end are

can system() interrupt perl at runtime?

2003-08-14 Thread Martin A. Hansen
Hi Is there a way to make an exception from an external program run with system( program, arg1, arg2, .. ); trigger a perl exception? that is, without explicitly checking $!, $? or $@ after every call ? Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: how do i list the methods connected to a object?

2003-08-14 Thread Martin A. Hansen
On Wed, Aug 06, 2003 at 10:24:09PM +0100, Rob Dixon wrote: Martin A. Hansen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, Aug 05, 2003 at 08:18:24PM +0100, Rob Dixon wrote: Ovid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Peter Scott [EMAIL

Re: how do i list the methods connected to a object?

2003-08-14 Thread Martin A. Hansen
, $query_beg, $query_end, $query_name, $subject_beg, $subject_end, $strand, $eval, $frame ); $script = ( split /, $0 )[ -1 ]; $usage = qq( $script by Martin A. Hansen, July 2003. $script parses blast repport files and writes GFF to STDOUT Usage: $script blast blast blast blast

SOLVED: how do i list the methods connected to a object?

2003-08-14 Thread Martin A. Hansen
; $methods = Class::Inspector-methods( $ref, 'full', 'public' ); @{ $methods } = grep /$ref/, @{ $methods }; return Dumper( $methods ); } On Tue, Aug 05, 2003 at 12:19:57PM +0200, Martin A. Hansen wrote: hi i wonder how i can list all the methods availible from a given object

how do i list the methods connected to a object?

2003-08-14 Thread Martin A. Hansen
hi i wonder how i can list all the methods availible from a given object? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SOLVED: how do i list the methods connected to a object?

2003-08-11 Thread Martin A. Hansen
at 12:19:57PM +0200, Martin A. Hansen wrote: hi i wonder how i can list all the methods availible from a given object? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL

Re: how do i list the methods connected to a object?

2003-08-06 Thread Martin A. Hansen
On Tue, Aug 05, 2003 at 08:18:24PM +0100, Rob Dixon wrote: Ovid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Peter Scott [EMAIL PROTECTED] wrote: The problem here is that it will not print inherited or AUTOLOADed methods. [snip] So traverse the inheritance

how to: perl and gnuplot ???

2003-01-15 Thread Martin A. Hansen
hi i have script which generates a set of xy coordinates. how can i get the script to generate a gnuplot postscript file from theses xy-pairs? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

pipe in perl ???

2003-01-15 Thread Martin A. Hansen
hi how to use an array as input for a external command called within a perl script? im looking to pipe the array to the extarnal program ... martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 05:34:59AM -0800, John W. Krahn wrote: Martin A. Hansen wrote: hi Hello, hi again how to use an array as input for a external command called within a perl script? im looking to pipe the array to the extarnal program ... open PIPE, '| somecommand

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 08:27:13AM -0600, [EMAIL PROTECTED] wrote: Sorry if I already missed a post where you said you couldn't (have had the flu), but could you use one of the various modules in CPAN to control gnuplot instead of trying to manipulate it yourself? hi i did look at it, but i

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 10:33:45AM -0500, Bob Showalter wrote: Bob Showalter wrote: [EMAIL PROTECTED] wrote: i need to translate the following commandline to perl: (echo set term post; echo plot '-' w l; cat data) | gnuplot data.ps open(F, | gnuplot data.ps) or die $!;

how to recognize a number with regex?

2002-09-18 Thread Martin A. Hansen
hi what do a regex look like that only matches numbers of the format (the length of the number doesnt matter its the . thats the problem) 1233.1234 or 1234 martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

how to split a perl program on multiple files?

2002-07-16 Thread Martin A. Hansen
for the sake of order and logic, i want to split my perl script into two files. what is the smart way to do this? i guess there is many ways this can be done, lemmy hear them all ! :o) martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help! windows makes ^M in my forms?

2002-05-28 Thread Martin A. Hansen
-0700, drieux wrote: On Monday, May 27, 2002, at 07:31 , Martin A. Hansen wrote: my nice cgi forms works beautiful under konq on linux. but the windows machine generates ^M at the and of lines? this makes eval go fubar? how can i prevent this??? http://www.wetware.com/drieux/pbl/RegEx

help! windows makes ^M in my forms?

2002-05-27 Thread Martin A. Hansen
my nice cgi forms works beautiful under konq on linux. but the windows machine generates ^M at the and of lines? this makes eval go fubar? how can i prevent this??? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

printing from records ?

2002-05-06 Thread Martin A. Hansen
hi im able to generate records of this kind: { 'bleh' = { 'ISHpix' = [], 'gelpix' = [], 'base' = [ '' ], 'norm' = [

Re: printing from records ?

2002-05-06 Thread Martin A. Hansen
hi felix the exists check works nicely :) but i cant get the print to work, using my version of your sub: sub print_record { my ( $record_key ) = @_; my $record; my $records; # read in records $records = read_recordfile; foreach $record ( keys %{ $records-{ $record_key } }

Re: printing from records ?

2002-05-06 Thread Martin A. Hansen
hi again im practicing handling structures. im very much a newbie at this so theres prolly something wrong with my code. If this is what you want, maybe you have an error in your read_recordfile? sub read_recordfile { my $records; { local ($/) = undef; open SOURCE,

printing element from record ?

2002-05-03 Thread Martin A. Hansen
hi, im having trouble printing out the key of this record hash: i wan the result to print: THIS_HERE im sure its trivial, but i cant figure it :) martin { 'THIS_HERE' = { 'ISH' = [ '3'

Solved: sort regex trouble!

2002-04-25 Thread Martin A. Hansen
hi i finally got it to work. it was very simple ... _if_ you remember that its not td but td align=foo you are trying to match! martin On Wed, Apr 24, 2002 at 11:04:42AM -0400, David Gray wrote: May I suggest: (my $A = $a) =~ s/^trtd(\d+)\/td/$1/; (my $B = $b) =~ s/^trtd(\d+)\/td/$1/;

web automation - where to read?

2002-04-25 Thread Martin A. Hansen
hi im trying to write a scipt that crawls a website. however, with only the documentation from the perl cookbook and some no_good manpages from the LWP modules, im stuck! where can i find som documentation (pref. online) ? or even some examples ? regards martin -- To unsubscribe, e-mail:

Re: web automation - where to read?

2002-04-25 Thread Martin A. Hansen
On Thu, Apr 25, 2002 at 01:57:07PM -, Felix Geerinckx wrote: im trying to write a scipt that crawls a website. however, with only the documentation from the perl cookbook and some no_good manpages from the LWP modules, im stuck! Would you care to explain what is 'no_good' about the

Re: regex question

2002-04-18 Thread Martin A. Hansen
hi john i implementet your solution. mine actually did work, but yours seemed more logical. it works nicely. thank you martin On Wed, Apr 17, 2002 at 12:58:07PM -0700, John W. Krahn wrote: [EMAIL PROTECTED] wrote: hi, Hello, im pasting some more of the lines i need to parse. i

strange cgi error?

2002-04-16 Thread Martin A. Hansen
hi i have a faulty cgi script which hangs my browser (konq). running the cgi script from a shell shows this first line: Something is wrong?Content-type: text/html so, what is wrong? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

automagic web query ?

2002-04-15 Thread Martin A. Hansen
hi im trying to write a script that does a search on a remote website. the script needs to fill in a form field with a search word and save all the results. there is three different form fields on the webpage, but im only interested in the first one. the results comes in 10 per page only,

Data::Dumper documentation ?

2002-03-19 Thread Martin A. Hansen
hi i have read the documentation on Data::Dumper from Learning Perl, Perl Cookbook and perldoc. however, im still very confused. im looking for some beginners documentation and examples. can anyone direct me? :o) martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Data::Dumper documentation ?

2002-03-19 Thread Martin A. Hansen
heh - that was exactly half of what i was looking for - how to dump stuff! great :) mayby you can help me out with the second part too? : if i have a datastructure (a hash) dumped to a file using Data::Dumper, how can i recreate the datastructure/hash in another program? if i do something like

external hashtable

2002-03-18 Thread Martin A. Hansen
hi i have some files of the format: { 'key1' = 'value2', 'key2' = 'value3', 'key3' = 'value4', 'key4' = 'value5', 'key5' = 'value6', } the values are large huge chunks of text. how can i import such a file into a perl script as a hash? and how can i write the hash to a new file (same format

Re: external hashtable

2002-03-18 Thread Martin A. Hansen
ok, im on a linux box here. and i do have Data::Dumper. so how would the solution with Dumper work? theres not very much documentation on Dumber in the camel... martin I suggest Data::Dumper, which can do exactly this function. -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

interesting question about variables

2002-03-15 Thread Martin A. Hansen
hi i have a loop containing the following block of code. however, first time the loop is run, $text_link is empty, which it shouldn't be. i cant move the declaration of $text_link above the if statment, because then the $figure_name would be empty. now i guess im really missing out on

regex question

2002-03-13 Thread Martin A. Hansen
hi i have a long text file. in this text file several strings of the form: ### filename.jpg ### are embedded. how should a regex look that takes following: text before ### filename.jpg ### text after and returns text before text after and the filename.jpg saved in a $ :o) martin --

easy way to make a hash of filenames?

2002-03-11 Thread Martin A. Hansen
hi im trying to make a hashtable of filenames, where the key is a forthrunning number and the value is a filename in a dir. so i have a dir with files: /dir/foo.jpg bar.jpg and i want a %hashtable = ( 1 = 'foo', 2 = 'bar' ) how can this be

Solved: easy way to make a hash of filenames?

2002-03-11 Thread Martin A. Hansen
neat works straight away :) thx martin On Mon, Mar 11, 2002 at 02:15:59PM +, Jonathan E. Paton wrote: so I have a dir with files: /dir/foo.jpg bar.jpg and I want a %hashtable = ( 1 = 'foo', 2 = 'bar' ) how can

sort order of hash keys

2002-02-26 Thread Martin A. Hansen
hi i would like to know if theres a smart way to unwind a hashtable so that the key / value pairs comes out in the same order as they are in the table. :o) martin -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sort order of hash keys

2002-02-26 Thread Martin A. Hansen
yeah, i new this was tricky. my hash keys / values have uneven names so i cant use a sort routine directly. thats why i would like to get the key / values in the same order as they are in the hashtable file. whats the name of that hash modules? :o) martin On Tue, Feb 26, 2002 at

appending files

2002-02-25 Thread Martin A. Hansen
hi i have this very interesting task, and i need some inspiration. i have a directory with say 10 fcgi files (text files): now i would like to have a temp.fcgi file which contains all of the date from the .fcgi files (appended). however, i want my program to update the temp.fcgi file if new

Re: appending files

2002-02-25 Thread Martin A. Hansen
interesting, but no. i can download these .fcgi files from a database and they are quite generic (they contains loads of records). all i wanted is to collect all therecords in one big fcgi file for outputting and sorting. but i may download new .fcgi files regularly and i want them included

unwinding hash or what it is?

2002-02-14 Thread Martin A. Hansen
hi i have inherited this piece of code and i have been wondering hard about how i can print the different @records returned from the subroutine? im not even sure whats on my hand here. is this a hash of arrays or a hash of array references? and how do i unwind those? martin, beginning

Re: unwinding hash or what it is?

2002-02-14 Thread Martin A. Hansen
On Thu, Feb 14, 2002 at 10:40:20AM -0500, Chas Owens wrote: On Thu, 2002-02-14 at 10:19, Martin A. Hansen wrote: hi i have inherited this piece of code and i have been wondering hard about how i can print the different @records returned from the subroutine? im not even sure whats

CGI table width

2002-02-04 Thread Martin A. Hansen
hi how can i control the width of each column or cell in my table? i dont exactly know what the following width switch does? print table({-border = 0, -width = '100%'}, Tr[ td({ width = 75 }, ['', $headline, '']), td( ['', $hr,

width of table cells and CGI ???

2002-01-31 Thread Martin A. Hansen
hi i am playing with CGI and tables how do i set the width of a cell? my $embeddedtable = table({-border = 0}, Tr[ td(['Title', $title]), td(['First Name', $firstname]), td(['Last Name', $lastname]),

RE: width of table cells and CGI ???

2002-01-31 Thread Martin A. Hansen
Message- From: Martin A. Hansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 7:47 AM To: [EMAIL PROTECTED] Subject: width of table cells and CGI ??? hi i am playing with CGI and tables how do i set the width of a cell? my $embeddedtable = table({-border = 0

how to get hash values returned from a subroutine?

2002-01-28 Thread Martin A. Hansen
hi there im trying to call a subroutine and get it to return some hash table values. however, i have two problems. 1. it does not work. theres something wrong with my foreach sentence, but i cant see what it is. however, the commented foreach sentence do work? 2. the @return_array

how do i utilize an external hashtable?

2002-01-28 Thread Martin A. Hansen
hi if i have a file called table.hash looking like this: { 'HEADLINE' = 'Carcinoma in Situ', 'SUBHEADLINE' = ' the precursor cell for testicular germ cell cancer in adolescents and young adults ', 'BODYTEXT' = ' This site provides information on research, diagnosis and management of early

CGI and tables ?

2002-01-25 Thread Martin A. Hansen
hi im trying to build a webpage with perl CGI the object way... the only documentation i have looked at is man CGI can anyone recommend some online documentation? anyway: is it possible to render a table with something like: print $newCGI-start_table(-border='1'); print

subroutine returning lines of text

2002-01-16 Thread Martin A. Hansen
hi im wondering how i can make a subroutine that will return all text lines between certain marks such as START and STOP: text file: START text is here and there is a lot of it STOP so i would like to call the subroutine with the arguments START and STOP (because i may need more starts and

silly beginners problem :)

2002-01-15 Thread Martin A. Hansen
hi im trying to make a script to read a textfile with the following format: TITLE Welcome to Carcinoma in Situ i want my script to recognice the TITLE tag and save the following line(s) in $TITLE: heres what i have done: while () { chomp; if (/TITLE\s*([A-Za-z]+)/) {