Re: subroutine?

2006-06-13 Thread swayam panda
Hi Ryan, first of all the subroutine defination is Ok but how u will call the subroutine???Through the name right? so sub ([EMAIL PROTECTED], [EMAIL PROTECTED]); is wrong instead u should call the function through it's name like collect([EMAIL PROTECTED], [EMAIL PROTECTED]); or simply

Re: Help understand documentation

2006-06-13 Thread Xavier Noria
On Jun 13, 2006, at 6:14, Vijay Kumar Adhikari wrote: I understand. My question is that Net::Ping does not use that info at all. If a host is alive, it will be listed in the output no matter what port you specify. Is this a bug? The module uses the port in several subroutines, like this

Re: Using Net::SSH::Perl to execute a set of commands

2006-06-13 Thread Kelvin Wu
Sorry I didn't get you, why it is related to Math::BigInt::GMP? To me it sounds like a SSH interactive issue... On 30/05/06, Oyler, Nathan [EMAIL PROTECTED] wrote: Have you installed Math::BigInt::GMP? Might not be it, but I was having a somewhat similar problem that it fixed.

CPAN help

2006-06-13 Thread Beast
I'm running /usr/bin/wget -O - http://cpan.cbn.net.id/authors/01mailrc.txt.gz; test just fine. Why? [EMAIL PROTECTED] ~]# cpan Mail::SpamAssassin CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning: Found only 0 objects in /root/.cpan/Metadata CPAN: LWP::UserAgent

SOAP::WSDL cant get a simple example working

2006-06-13 Thread Ramprasad A Padmanabhan
Hi, I have installed the example server script test.cgi from SOAP::Clean examples Ref http://backpan.perl.org/authors/id/S/ST/STODGHIL/SOAP-Clean-0.02.readme Now I have a simple perl script just connecting to this server , but it is failing #!/usr/bin/perl use SOAP::WSDL; use strict; my

module install on HPUX 11.11 ....any suggestions?

2006-06-13 Thread Smith, Derek
I know I will probably need another compiler but wanted to make sure. I changed the make file to point to gcc, g++, cpp and c++ and I am still getting errors. Here are my errors using /usr/bin/cc [EMAIL PROTECTED] make cp Size.pm blib/lib/Term/Size.pm AutoSplitting blib/lib/Term/Size.pm

DESTROY executed twice

2006-06-13 Thread Glaessl, Danilo
Hi, I have a OOP problem. I wrote a script that forks several child processes that in turn create instances of the same class: for (my $i = 0; $i = 10; $i++) { defined(my $pid = fork()) or die Unable to fork: $!; if ($pid) { # parent process next; }

Re: DESTROY executed twice

2006-06-13 Thread Randal L. Schwartz
Glaessl, == Glaessl, Danilo [EMAIL PROTECTED] writes: Glaessl, I have a OOP problem. I wrote a script that forks several child Glaessl, processes that in turn create instances of the same class: The DESTROY is being executed in both the parent and child. There's really no way around that...

scoping problem with hash

2006-06-13 Thread dermot
Hi, This is a bit of an extension on an earlier post. I am trying to create a data structure from a file (contents below). It is meant to be a hash of hashes but I suspect there is either a typo somewhere or I am hitting some scoping problems. All that is left in the hash is the last data

Re: scoping problem with hash

2006-06-13 Thread Mr. Shawn H. Corey
On Tue, 2006-13-06 at 17:20 +0100, [EMAIL PROTECTED] wrote: print STDERR Dumper(%times); print STDERR Dumper( \%times ); -- __END__ Just my 0.0002 million dollars worth, --- Shawn For the things we have to learn before we can do them, we learn by doing them. Aristotle * Perl

Re: scoping problem with hash

2006-06-13 Thread Dermot Paikkos
On 13 Jun 2006 at 12:27, Mr. Shawn H. Corey wrote: On Tue, 2006-13-06 at 17:20 +0100, [EMAIL PROTECTED] wrote: print STDERR Dumper(%times); print STDERR Dumper( \%times ); That seems to have helped the Dumper output but I still haven't managed to get the other assignments to stick. The

Re: scoping problem with hash

2006-06-13 Thread Mr. Shawn H. Corey
On Tue, 2006-13-06 at 17:20 +0100, [EMAIL PROTECTED] wrote: Hi, This is a bit of an extension on an earlier post. I am trying to create a data structure from a file (contents below). It is meant to be a hash of hashes but I suspect there is either a typo somewhere or I am hitting some

Re: scoping problem with hash

2006-06-13 Thread Mr. Shawn H. Corey
On Tue, 2006-13-06 at 13:08 -0400, Mr. Shawn H. Corey wrote: $times{$hashkey}{home} = $time; $times{hashkey}{total} = $total; # Your code replaces, not augments Consider adding this to your library of useful Perl utilities: # -- # hset %hash, ( $key =

newlines on win32, old mac, and unix

2006-06-13 Thread Anthony Ettinger
I have to write a simple function which strips out the various newlines on text files, and replaces them with the standard unix newline \nafter reading the perlport doc, I'm even more confused now. LF eq \012 eq \x0A eq \cJ eq chr(10) eq ASCII 10 CR eq \015

RE: scoping problem with hash

2006-06-13 Thread Charles K. Clarkson
Mr. Shawn H. Corey wrote: : for ( keys %kv_pairs ){ : $hash_ref-{$_} = $kv_pairs{$_}; : } You could use a hash slice there. @{ %$hash_ref }{ keys %kv_pairs } = values %kv_pairs; HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254

Re: newlines on win32, old mac, and unix

2006-06-13 Thread Xavier Noria
On Jun 13, 2006, at 20:26, Anthony Ettinger wrote: I have to write a simple function which strips out the various newlines on text files, and replaces them with the standard unix newline \n In Perl \n depends on the system, it is eq \012 everywhere except in MacOS pre-X, where it is \015.

What is a prompt package that actually works on Windows

2006-06-13 Thread Michael Goldshteyn
It is definitely not IO::Prompt and it is most likely not anything that has a Term::ReadKey dependency. Thanks for any suggestions -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: What is a prompt package that actually works on Windows

2006-06-13 Thread Timothy Johnson
What are you trying to do, and how is it failing? -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael Goldshteyn Sent: Tuesday, June 13, 2006 12:50 PM To: beginners@perl.org Subject: What is a prompt package that actually works on Windows It is definitely not

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

2006-06-13 Thread Michael Oldham
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 format):

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

2006-06-13 Thread Timothy Johnson
One problem is that you are using the $_ variable twice. while(FILE) assigns $_ to the current line being read, and foreach(@array) assigns $_ to the current element of the array in question. It's usually a good idea to be more explicit anyway, and keep the $_ usage to a minimum so you don't

desktop application

2006-06-13 Thread Dave Pollak
I'm a Perl newbie with some PHP and ColdFusion experience. My employer has a book on cd that he wants to convert to a desktop application so it will be interactive and secure. He wants each copy licensed to a machine and wants it to be able to interact with a Windows desktop with popups out of

RE: desktop application

2006-06-13 Thread Timothy Johnson
If you're looking to set up something like this, I strongly recommend buying the Perl Dev Kit from ActiveState. You'll get PerlApp and PerlMSI, which make distribution easy, and PerlTray, which makes writing System Tray applets in Perl much easier. You're probably also going to want to get

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

2006-06-13 Thread Michael Oldham
Thanks Timothy. I tried the code you supplied and unfortunately the output file is still empty. Do you think there might be a problem with the regular expression in: if($find =~ /^probe:\w+:(\w+):/) ? Mike -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent:

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

2006-06-13 Thread Timothy Johnson
Oops! Try changing if($find =~ /^probe:\w+:(\w+):/) to if($line =~ /^probe\:\w+\:$find\:/) { I can't remember if you have to escape colons or not. If you do, then you're probably a pearlfish. -Original Message- From: Michael Oldham [mailto:[EMAIL PROTECTED] Sent:

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

2006-06-13 Thread Tom Phoenix
On 6/13/06, Michael Oldham [EMAIL PROTECTED] wrote: while (PROBES) { print OUT scalar(PROBES); You don't want that second use of PROBES. Check the documentation for readline() in the perlfunc manpage. Hope this helps! --Tom Phoenix Stonehenge Perl

CGI script not showing the textbox

2006-06-13 Thread Nath, Alok (STSD)
Hi, Need some help to run this script. #!/usr/bin/perl -w use CGI qw(:standard); my $favourite = param(flavour) ; print header; # here's a comment. print the header print start_html(Alok's Page) , h1( Paragraph... !) ; if ($favourite) { print q(Your favourite is :