Re: A loop to parse a large text file--output is empty!

2006-06-23 Thread Muma W.
D. Bolliger wrote: Michael Oldham am Freitag, 23. Juni 2006 18:20: [...] A faster strategy would be: 1. create a lookup hash with the IDs of IDFILE (IDs as keys) [...] Doh! That's right. A hash would be a hundred times faster. Here's the rewrite of my program to use a hash: #!/usr/bin/p

Re: Can't use string ("3862926") as a HASH ref while "strict refs"

2006-06-23 Thread Muma W.
Moon, John wrote: [...] 150 $totals{$fund}{$service}{$acct}{AMT} += $amt; 151 $totals{$fund}{$service}{$acct}{QTY} += $n_qty; 152 $totals{$fund}{$service}{AMT} += $amt; 153 $totals{$fund}{$service}{QTY} += $n_qty; 154 $totals{$fund} += $amt; > [...] I thi

Re: A loop to parse a large text file--output is empty!

2006-06-23 Thread Muma W.
Michael Oldham wrote: Hello again, Thanks to everyone for their helpful suggestions. I finally got it to work, using the following script. However, it takes about 5 hours to run on a fast computer. Using grep (in bash), on the other hand, takes about 5 minutes (see below if you are interested

Re: converting between time and string

2006-06-22 Thread Muma W.
bnj.s wrote: Hello, I have a file with lots of times in the format "01:22:33,456", where the numbers after the comma represent the milliseconds. I would like to reduce all these times by a given offset. [...] You can use POSIX::mktime to convert the string into a time value, but the millis

Re: Trying to add hyperlink

2006-06-22 Thread Muma W.
Nath, Alok (STSD) wrote: Hi, I was trying to add a hyperlink to each of the boxes but it was not putting it in the right place.Can anyone help me in this regard ? [...] Try this: td([ a({href=>'http://url.example.com'}, 'My link text') ]) -- To unsubscribe, e-mail: [EMAIL PRO

Re: How to convert these tablespace output report into a delimited file, csv or tilde

2006-06-21 Thread Muma W.
BenBart wrote: Hi all, Can anyone suggest what is the best way to convert the lines of text between the = into a delimited file? [...] I suggest setting the input-record-separator to "" since your tablespace records are separated by empty lines. Then you'd read in each record and u

Re: A loop to parse a large text file--output is empty!

2006-06-14 Thread Muma W.
Michael Oldham wrote: Dear all, I am a Perl newbie struggling to accomplish a conceptually simple bioinformatics task. I have a single large file containing about 200,000 DNA probe sequences (from an Affymetrix microarray), each of which is accompanied by a header, like so (this is in FASTA for

Re: Create array of references

2006-06-09 Thread Muma W.
beginner wrote: Hi, I am trying to create an array of references but am getting stuck at how/when to push the reference into the array [...] } elsif ($key =~ /j/ ) { $times = { out => $time}; Try this: $times->{out} = $time; [...] -- To unsubscribe, e-

Re: Newline error

2006-06-06 Thread Muma W.
joseph wrote: All, Just like to ask for correction on what's wrong with my script it gives spit out this error when i run it. Unsuccessful open on filename containing newline at disksize.pl line 8. Can't open file No such file or directory But it runs without this error whenever i feed it up

Re: slurp from commandline?

2006-06-06 Thread Muma W.
Alan_C wrote: [...] perl -0777 -pne 's/\n+/\n/g' rsync_sl_log.txt > rsync_sl_log.txt.new ^^ 4th attempt. Bingo Works! Though I'm unsure if I'm attempting to mix shell and Perl there (bash shell redirection operator: > redirect STDOUT to a file) Though it works, does anyone have any

Re: Checkbox form processing problem

2006-06-06 Thread Muma W.
Graeme McLaren wrote: [...] It works but unfortunately it loses the order when checking one of the checkboxes. Can anyone suggest a way to generate a checkbox form and when updating the values it keeps the order? [...] I don't know if you can ensure the browser submits elements in a certain

Re: help in regular expression

2006-06-01 Thread Muma W.
Irfan J Sayed wrote: Hi , I am using following code #!/usr/local/bin/perl # Main program use warnings; use strict; my $file = "c:\backup.pl"; open(FH,$file) || die " can't open a file"; [...] For the die statement, use this instead: die " can't open this file: $file reason: $!";

Re: hash and array question

2006-05-31 Thread Muma W.
Andrej Kastrin wrote: Dear Perl users, below is three column, vertical bar separated file. First column refers to ID number, second designates name and the last one refers to corresponding value. There are 8 possible names: A, B, C, D, E, F, G and H (only first seven preset in my dataset) 1