Re: Use of uninitialized value in numeric ne error

2007-12-21 Thread Dan Klose
On 21 Dec 2007, at 10:43, lerameur wrote: Hello and cheers to all, hello I wrote a small program and it does work, but I get this error message every tim I run the script: Use of uninitialized value in numeric ne (!=) at ./reverse_string.pl line 11. basically it is a menu and when the user

Re: fixed list combinatorics

2007-11-28 Thread Dan Klose
yeah sorry, I should have posted. Thanks all for the solutions. Next time I will post if I get a solution to the problem. On 28 Nov 2007, at 19:58, yitzle wrote: In a personal email conversation, he realized what he was actually looking for is the power set. List::PowerSet http://search.cp

Re: fixed list combinatorics

2007-11-28 Thread Dan Klose
key; >push ( @{$comb}, $line ); > >for ( my $i = $n ; $i <= $#list ; $i++ ) { >$line .= $list->[$i]; >push ( @{$comb}, $line ); >} >$n++; >} > } > > If this indeed what your asking. > > A > AB >

fixed list combinatorics

2007-11-28 Thread Dan Klose
Hi list, I am having a bad day and would really like some help (the coffee hasn't). I have a list that looks like: my @list = (1,2,3,4); I would like to generate all patterns that follow: 1 2 3 4 12 123 23 34 234 1234 The list can be of any length and the next number in the list must be

Re: DBI:ORACLE

2005-12-07 Thread Dan Klose
On Wed, 2005-12-07 at 12:50 +0200, Lorenzo Caggioni wrote: > HI!!! Hi > i'm tring to use DBI module > > Here is the code > > #!/geneva/geneva/dev1/perl5/bin/perl > # > > use strict; > use DBI; > use warnings; > > my $dbh = DBI->connect( 'dbi:Oracle:MYSEED, > 'donald', >

Re: Open source IDE for Perl

2005-11-30 Thread Dan Klose
> Dear all, > which is yours "best" open source IDE for Perl. I use SciTE under Linux, > but I'm a little confused on Windows. Which do you prefer? > >>Best, Andrej I use emacs on Mac, Linux and Windows. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Checking the Machine's Operating System

2005-11-21 Thread Dan Klose
On Mon, 2005-11-21 at 14:16 +0530, Mazhar wrote: > Hi Folks, Hello > I have a requirement from the clinet where in i have to take control of the > machines (either by telnet,SSH). My first point to be addressed is how can i > take a remote machine TELNET through perl script and also once i take th

Re: How to change the Owner of a file

2005-10-31 Thread Dan Klose
On Mon, 2005-10-31 at 13:45 +0530, Rakesh Mishra wrote: > Hi folks Hello, > Can any body tell me how to change the owner of a file ?? > > I have written this script ... > > unless (chown $uid , $gid , $filename) > { > die "chown failed :$!"; > } > > this code will give me the error you

Re: about running unix command in perl script

2005-10-28 Thread Dan Klose
On Fri, 2005-10-28 at 03:37 -0700, ZHAO, BING wrote: > Hi, > Is there a way to run unix command in perl? > To be specific, for the ftp command: > 1.ftp ftp.rcsb.org > 2.cd /pub/pdb/data/structures/divided/pdb/ > 3.cd

Re: Help unsubscribing from list

2005-10-17 Thread Dan Klose
NO IDEA - sorry! To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: do I need further modules?

2005-10-17 Thread Dan Klose
On Mon, 2005-10-17 at 18:12 +0200, Richard Müller wrote: > Hello, > I want to use Tk::jpeg::lite. I have a standard SuSE 9.2 (perl 5.8.5) > installation and I have added every package which even smells like Perl, also > Perl Tk. When compiling Tk::jpeg::lite (perl Makefile.PL) I get the > foll

Re: EAR file

2005-10-13 Thread Dan Klose
On Thu, 2005-10-13 at 07:59 -0400, Pant, Hridyesh wrote: > Hi, Hello. > I have on ear file,I want to extract this ear file and need to changed > some text data in files inside this ear file.could anybody help me.. Yes. To give Mr Devers a break from typing: "Show us some code..." You should s

Re: automatically submitting web forms.

2005-10-11 Thread Dan Klose
On Tue, 2005-10-11 at 17:47 +0200, Xavier Noria wrote: > On Oct 11, 2005, at 17:27, Dan Klose wrote: > > > Thanks for your suggestions. I am going to give it a try... > > However there is another way I am also going for. If you have lynx > > you > > can use: >

Re: automatically submitting web forms.

2005-10-11 Thread Dan Klose
On Tue, 2005-10-11 at 16:44 +0200, Xavier Noria wrote: > On Oct 11, 2005, at 16:23, Dan Klose wrote: > > > I would like to be able to automagically submit a form to a > > server. The > > server requires that I give it a sequence of letters (a protein) in > > one

automatically submitting web forms.

2005-10-11 Thread Dan Klose
Hello List, I would like to be able to automagically submit a form to a server. The server requires that I give it a sequence of letters (a protein) in one box, my email, and select several radio buttons to my chosen output. In this case the server is PSIPRED protein structure prediction server

HOA idiocy.

2005-10-10 Thread Dan Klose
Hello list. I have a hash of arrays but when I come to run the script I get the following error: Odd number of elements in hash assignment at ./all2seq.pl line 15. I can't for the life of me work out why I am getting this error! I have never hand written a HOA and so I have tried this: my %prop

Re: problem with GD

2005-10-07 Thread Dan Klose
On Fri, 2005-10-07 at 03:55 -0700, Aditi Gupta wrote: > Hello everybody, > I've tried installing GD for Activestate Perl on a Windows XP system. I've > downloaded the module from CPAN. But the module contains GD.xs file and > hence I've to build it myself. I used C compiler but it is giving many >

Re: regd. executing one perl file inside another perl file

2005-10-04 Thread Dan Klose
am Member > Tata Consultancy Services Limited > Ph:- 044-5816 > Cell:- 9283199460 > Mailto: [EMAIL PROTECTED] > Website: http://www.tcs.com > Dan Klose <[EMAIL PROTECTED]> > 10/04/2005 07:31 PM > To > [EMAIL PROTECTED] > cc > beginners@perl.org > Subject

Re: regd. executing one perl file inside another perl file

2005-10-04 Thread Dan Klose
On Tue, 2005-10-04 at 15:31 +0530, [EMAIL PROTECTED] wrote: > Hi perlers > > Hello. > I have one query regarding how to execute one perl file with in the > another perl file. > The problem is like this I have to do 2-3 tasks by running 2-3 perl script > for each task ... in some o

RE: how to make charts using GD

2005-09-28 Thread Dan Klose
On Wed, 2005-09-28 at 08:10 +0200, Thomas Bätzler wrote: > Hello, > > Aditi Gupta <[EMAIL PROTECTED]> asked: > > I have a perl code that generates a sequence of values which > > i want to plot on y-axis against 1,2,3... on x-axis. I've > > read that GD::Graph could be used for it. But I've n

Re: the time a program runs

2005-09-26 Thread Dan Klose
On Mon, 2005-09-26 at 06:32 -0400, Tom Allison wrote: > Octavian Rasnita wrote: > > Hi, > > > > I have tried to find out the time a perl program runs, and I have used: > > > > #at the start of the program: > > my $begin = (times)[0]; > > my $begin_t = time(); > > > > ... The program follows > >

Re: Looking for perl scripts to remove ^M

2005-09-25 Thread Dan Klose
On 9/23/05, Jay Savage <[EMAIL PROTECTED]> wrote: > > On 9/23/05, Ryan Frantz <[EMAIL PROTECTED]> wrote: > > > > > > > -Original Message- > > > From: Ankur Gupta [mailto:[EMAIL PROTECTED] > > > Sent: Friday, September 23, 2005 2:48 PM > > > To: Dave Adams > > > Cc: beginners perl > > > Subj

open file for read and append

2005-08-23 Thread Dan Klose
Hello, I have a script where I need to open a file, read from it sequentially, and append items to the file as I go along, continuing to read these items as I go. But seems I can't open the file for read and append at the same time. Does anyone have any ideas? Many thanks. -- Daniel Klose PhD

Re: A better way.

2005-08-02 Thread Dan Klose
Hi, I have gone for the following code: my %avs_dev = map{ $_ => [mean($hoa{$_}), dev($hoa{$_})] } keys %hoa; for (sort {$avs_dev{$a}[0] <=> $avs_dev{$b}[0]} keys %avs_dev) { print "$_, $avs_dev{$_}[0], $avs_dev{$_}[1]\n"; } I have never used MAP before... it looks handy! Works a treat. Th

A better way.

2005-08-02 Thread Dan Klose
Hello Everyone. I have the following code: ### CODE BLOCK ### my %hash_of_arrays2; for (keys %hash_of_arrays) { my @array_of_data = exists($hash_of_arrays{$_}) [EMAIL PROTECTED] :(); my $mean = mean([EMAIL PROTECTED]); #GET MEAN my $std_dev = dev([EMAIL PROTECTED]); #GET STAND

Re: how to append blocks in same file

2005-06-22 Thread Dan Klose
> Using a hash of arrays will not necessarily preserve the order... If you don't want to worry about sorting the order of the blocks i.e. doing it yourself then use Tie::IXhash (something like that on CPAN) to preserve the order, you then don't have to worry about unbalanced blocks and reassembly

RE: how to append blocks in same file

2005-06-22 Thread Dan Klose
If I was doing this I would split the file on the gaps between blocks and the use the unix paste function to assemble the blocks. &> paste A B C > D ? using a hash of arrays (HOA) to store each block and then go back over the HOA each element at a time ... although this is probably overkill? On

\n & ^M

2005-06-22 Thread Dan Klose
Hi everybody, I have exported an EndNote 7 Library on my Mac to a Bibtex formatted plain text file. When I look at the file, rather than having lines ending with '\n' I seem to have '^M'. I think this is a Mac end of line problem but the things I have tried don't work and I was wondering if anyon