Re: Math::GMP

2010-02-25 Thread Dave Tang
On Thu, 25 Feb 2010 17:27:25 +1000, Shlomi Fish shlo...@iglu.org.il wrote: Hi Dave! Hi Shlomi! Thank you for your reply. [snip] I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I have installed a GMP library (required for Math::GMP) but when I try to install

Re: Math::GMP

2010-02-25 Thread Dave Tang
On Thu, 25 Feb 2010 18:30:33 +1000, Octavian Rasnita orasn...@gmail.com wrote: From: Dave Tang d.t...@imb.uq.edu.au Dear list, I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I have installed a GMP library (required for Math::GMP) but when I try to install Math

Re: Math::GMP

2010-02-25 Thread Dave Tang
On Thu, 25 Feb 2010 19:54:13 +1000, Salvador Fandino sfand...@yahoo.com wrote: On 02/25/2010 07:14 AM, Dave Tang wrote: Dear list, I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I have installed a GMP library (required for Math::GMP) but when I try to install Math

Re: Math::GMP

2010-02-25 Thread Dave Tang
, -- Dave Tang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Math::GMP

2010-02-24 Thread Dave Tang
+ 0.09 cusr 0.03 csys = 0.18 CPU) Result: FAIL Failed 1/6 test programs. 0/0 subtests failed. make: *** [test_dynamic] Error 255 Many thanks, -- Dave Tang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Shorthand for binary bitwise math?

2010-02-22 Thread Dave Tang
On Tue, 23 Feb 2010 11:23:23 +1000, Steve Bertrand st...@ibctech.ca wrote: I belong to several technical lists, and the de-facto standard is to Reply-All. Understood and thank you for your answer. -- Dave Tang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Shorthand for binary bitwise math?

2010-02-21 Thread Dave Tang
with my thank you note. -- Dave Tang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Perl script to monitor memory usage on unix box

2010-02-08 Thread Dave Tang
Hi everybody, I want to write a script that checks memory usage of my RHEL box, and ran as a cron job say every 10 minutes. I could write the Perl script to run a system command like ps aux, parse that information and kill a job if 90% of the total system memory (and I realise most of

Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread Dave Tang
On Mon, 08 Feb 2010 22:52:37 +1000, Shawn H Corey shawnhco...@gmail.com wrote: Dave Tang wrote: Hi everybody, I want to write a script that checks memory usage of my RHEL box, and ran as a cron job say every 10 minutes. I could write the Perl script to run a system command like ps aux

Re: speed test

2009-12-04 Thread Dave Tang
On Sat, 05 Dec 2009 10:07:34 +1000, Jenda Krynicky je...@krynicky.cz wrote: what was the name of that law? Something that said that the speed of computers doubles every ??? years. Were you referring to this? http://en.wikipedia.org/wiki/Moore's_law Dave -- Using Opera's revolutionary

Re: Insecure $ENV{PATH} message

2009-11-29 Thread Dave Tang
On Sun, 29 Nov 2009 16:30:56 +1000, Huub van Niekerk huubvanniek...@gmail.com wrote: Hi, Hello, I started getting this error after upgrading from Fedora 11 to 12. The line of code hasn't been changed: open my $LPR, '|-', qw/lpr -PDeskJet940C/ or die can't fork lpr: $!; The error is:

Re: Insecure $ENV{PATH} message

2009-11-29 Thread Dave Tang
On Sun, 29 Nov 2009 23:39:58 +1000, Huub van Niekerk huubvanniek...@gmail.com wrote: open my $LPR, '|-', qw/lpr -PDeskJet940C/ or die can't fork lpr: $!; $ENV{PATH} = ; at the start of the script, it doesn't seem to complain any more. Hope that helps, Thank you, though I'm not out of

Re: Regex to get last 3 digits of a number.

2009-11-24 Thread Dave Tang
On Tue, 24 Nov 2009 18:33:30 +1000, Dermot paik...@googlemail.com wrote: 2009/11/23 Dave Tang d.t...@imb.uq.edu.au: On Tue, 24 Nov 2009 09:39:09 +1000, Dermot paik...@googlemail.com wrote: 2009/11/23 Dave Tang d.t...@imb.uq.edu.au: On Mon, 23 Nov 2009 23:14:51 +1000, Shawn H Corey

Re: Regex to get last 3 digits of a number.

2009-11-23 Thread Dave Tang
On Mon, 23 Nov 2009 23:14:51 +1000, Shawn H Corey shawnhco...@gmail.com wrote: shadow52 wrote: [snip] The number is 0111 I was just wanting to get the last 3 digits from this number to be able to get an exact word phrase from my already loaded Hash table that I have created

Re: AW: Perl CGI Incremental find

2009-11-17 Thread Dave Tang
On Tue, 17 Nov 2009 19:20:42 +1000, Thomas Bätzler t.baetz...@bringe.com wrote: Hi, Jeff Pang pa...@uk2.net wrote: On Nov 17, 2009, Dave Tang d.t...@imb.uq.edu.au wrote: Is it possible to implement an incremental find* feature on a Perl CGI page? I'm running Apache2 with mod_perl on linux

Perl CGI Incremental find

2009-11-16 Thread Dave Tang
Hi everybody, Is it possible to implement an incremental find* feature on a Perl CGI page? I'm running Apache2 with mod_perl on linux. For example, if I have a list of stuff (A, Aa, B, Bb, C, CA, etc. stored in a file or database) and when a user starts typing in A into the web form, 2

Re: AW: AW: How do I pick one random element from an array?

2009-11-03 Thread Dave Tang
On Tue, 03 Nov 2009 17:48:55 +1000, Thomas Bätzler t.baetz...@bringe.com wrote: Dave Tang d.t...@imb.uq.edu.au asked: Just a quick question, how does Perl interpret something like $array[0.7995038473872]? Just like $array[ int(0.7995038473872) ], i.e. the floating point number is coerced

Re: AW: How do I pick one random element from an array?

2009-11-02 Thread Dave Tang
On Tue, 03 Nov 2009 17:23:38 +1000, Thomas Bätzler t.baetz...@bringe.com wrote: Majian jian...@gmail.com asked: [...] print Array of random: $array[rand @array]\n; I thoght it might work but it doesnt. I hope someone could give me an idea to work this out... TIMTOWTDY: a) print Array

Re: Database Help

2009-10-09 Thread Dave Tang
On Sat, 10 Oct 2009 00:07:01 +1000, Jyoti jcutiep...@gmail.com wrote: Hello All, I am able to connect to postgreSQL database via my server. I used PHP to connect .. now i wanna know how to create databases via php and access queries so that i get the results on my server. I have to make php

Re: Server HELP-urgent

2009-10-07 Thread Dave Tang
On Wed, 07 Oct 2009 17:38:59 +1000, Raymond Wan r@aist.go.jp wrote: Did you consider Dave's suggestion about using netblast (which I honestly have never used)? Ah I shouldn't have gotten it wrong in the first place, but its wwwblast. Basically just download the wwwblast-arch-os.tar.gz

Re: BLAST HELP

2009-10-06 Thread Dave Tang
On Tue, 06 Oct 2009 21:34:04 +1000, Jyoti jcutiep...@gmail.com wrote: Thanks for your help Dave. Not a problem Jyo. Yes that was Javascript.. Just as m a beginner, I thot we can convert javascipts to cgi scripts.!!! Am I wrong? You can use Perl to write a cgi script that outputs

Re: BLAST HELP

2009-10-05 Thread Dave Tang
experts you probably want to explain your problem in more general terms and elaborate. Thanks in Advance. Kind Regards, Jyo Hope that helps, -- Dave Tang Research Assistant Institute for Molecular Biosciences http://www.imb.uq.edu.au/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: BLAST HELP

2009-10-05 Thread Dave Tang
On Tue, 06 Oct 2009 13:33:27 +1000, Dave Tang d.t...@imb.uq.edu.au wrote: On Tue, 06 Oct 2009 12:11:47 +1000, Jyoti jcutiep...@gmail.com wrote: Hello, Hello Jyoti, Can anyone help me to know how to make a script which can take any sequences by user as user input and give blast results

Re: Error HELP PLZ !!!

2009-10-05 Thread Dave Tang
On Tue, 06 Oct 2009 11:57:53 +1000, Jyoti jcutiep...@gmail.com wrote: Hello All, Can anyone please help with one small error I am getting for line 16( The one which is bold n italic below.) The error is : Can't call method str on an undefined value at firstpage.pl line 16. Just a warning,

Re: perldoc output looks strange

2009-09-06 Thread Dave Tang
###7m8E#ModuleName###7m8E#ProgramName -- Dave Tang Research Assistant Institute for Molecular Biosciences http://www.imb.uq.edu.au/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Perl's superior text parsing power

2009-09-02 Thread Dave Tang
Hi everybody, I constantly read about Perl's powerful regular expression matching and string manipulation operators, and how it is superior to other programming languages in this aspect. Furthermore, I read this in the wikipedia entry of Perl: The language provides powerful text

Re: Perl's superior text parsing power

2009-09-02 Thread Dave Tang
On Thu, 03 Sep 2009 13:18:44 +1000, Uri Guttman u...@stemsystems.com wrote: TB == Tim Bowden tim.bow...@mapforge.com.au writes: TB On Thu, 2009-09-03 at 11:39 +1000, Dave Tang wrote: I wanted to ask why is Perl, in comparison to other programming languages, so powerful in text

Regular expression help

2009-08-26 Thread Dave Tang
Dear list, I am trying to import entries in a csv file into a relational database, however there are entries such as: a,b,c,d,e,f1,f2,g1,g2 which spoil my split(/,/). The quotes group f1 and f2 as a single entry. I know each each database entry should be atomic, but I'll deal with that

Re: Regular expression help

2009-08-26 Thread Dave Tang
On Wed, 26 Aug 2009 16:41:39 +1000, Chas. Owens chas.ow...@gmail.com wrote: On Wed, Aug 26, 2009 at 02:23, Dave Tangd.t...@imb.uq.edu.au wrote: Dear list, I am trying to import entries in a csv file into a relational database, however there are entries such as: a,b,c,d,e,f1,f2,g1,g2 which

Purpose of $$ in subroutine

2009-08-04 Thread Dave Tang
Hi everybody, I was reading perlfaq7.pod, 7.15: How can I pass/return a {Function, FileHandle, Array, Hash, Method, Regex}? In one of the examples it shows how regular expressions can be passed to subroutines: sub compare($$) { my ($val1, $regex) = @_;

Re: Purpose of $$ in subroutine

2009-08-04 Thread Dave Tang
On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens chas.ow...@gmail.com wrote: snip In this case it is telling Perl that compare expects two scalars as arguments. snip Now the compare($$) makes much more sense. snip There are many [pitfalls][2] to prototypes and they should really not be

Perl DBI error

2009-07-07 Thread Dave Tang
Hi everybody, I am having a problem with binding a variable when executing on a DBI object. The code goes: #!/usr/bin/perl use warnings; use strict; use DBI; #DBI variables my $database = 'databaseName'; my $hostname = 'localhost'; my $dsn = DBI:mysql:database=$database;host=$hostname; my

Re: Hello there

2009-07-06 Thread Dave Tang
On Tue, 07 Jul 2009 08:19:50 +1000, Emanuele Osimo e.os...@gmail.com wrote: Hello there, I'm a biologist and I'm trying to start using bioperl for bioinformatic purposese but I've never programmed. Could you suggest me something to read to start from 0 level? Have you looked at Beginning

perldoc perlboot

2009-06-18 Thread Dave Tang
Hello, I've been going through perldoc perlboot and I have a question about using the SUPER class. Here's the code in the documentation: #!/usr/bin/perl use strict; use warnings; { package Animal; sub speak { my $class = shift; print a $class goes , $class-sound, !\n;

Re: CGI

2009-06-09 Thread Dave Tang
On Tue, 09 Jun 2009 16:16:41 +1000, Irfan Sayed irfan_sayed2...@yahoo.com wrote: Hi ALL, i have written sample cgi script in perl. here it is #!/usr/bin/perl print Content-type: text/html\n\n; print HI; HTML HEAD   TITLEWelcome to CGI scripting /TITLE     /HEAD   /HTML     HI Try

Efficiently going through results

2009-06-09 Thread Dave Tang
Hello, I have a problem, which I have put into an analogy. Suppose a parent has 11 children. These children like chocolate. If 9 or more of the 11 children from the same parent like a particular chocolate, the parent will like the chocolate. I want to find out what types of chocolate each

Re: Array question

2009-03-30 Thread Dave Tang
On Tue, 31 Mar 2009 04:49:17 +1000, John W. Krahn jwkr...@shaw.ca wrote: Or instead of using arrays you could store the 1s and 0s in strings: $ perl -le' my $string = 10110111001; print $-[0] while $string =~ /0/g; ' 1 4 8 9 Hi John, Could you explain how the above code works please? I

Efficient way of comparing items in an array

2008-10-30 Thread Dave Tang
Hi everybody, I am working with a sorted array (sorted from smallest to largest), containing coordinates as such: 13645692 13645693 13645694 13645695 13645696 13645697 13645698 13645699 13645700 13645701 13645702 13645703 13645704 13645705 13645706 13645707 13645708 13645709 13645710

Re: Efficient way of comparing items in an array

2008-10-30 Thread Dave Tang
On Thu, 30 Oct 2008 16:04:31 +1000, Dave Tang [EMAIL PROTECTED] wrote: Hi everybody, I am working with a sorted array (sorted from smallest to largest), containing coordinates as such: 13645692 13645693 13645694 13645695 13645696 13645697 13645698 13645699 13645700 13645701 13645702

Re: perl file parsing

2008-10-23 Thread Dave Tang
Hello, Use bioperl (http://www.bioperl.org/wiki/Main_Page) for this task. This should do what you want: #!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $fastaFile = 'myfile'; my $pattern = 'CTTGGCGAGAAGGGCCGCTACCTGCTGGCCGCCTCCTTCGGCAACGT'; my $blockThreshold = '500'; my

Re: using unix command issue...

2008-10-20 Thread Dave Tang
Try moving $utadm_1 up a few lines, before calling the subroutine. #!/usr/bin/perl -w $utadm_l = /opt/SUNWut/sbin/utadm -l ; check_LANon () ; sub check_LANon { $LANstat = system( $utadm_l | grep On) ; print $LANstat\n ; } Dave On Tue, 21 Oct 2008 03:06:34 +1000, Ariel Casas

Re: writing to a .txt file issues

2008-10-09 Thread Dave Tang
Try taking away the + in your filehandle line, so that it reads: open (WRITE,/Users/dave/Documents/Programming/Perl/081008mathables/add.txt); Dave On Fri, 10 Oct 2008 09:31:02 +1000, David [EMAIL PROTECTED] wrote: