Re: Push to AoA

2009-05-13 Thread Steve Bertrand
Jim Gibson wrote: > On 5/13/09 Wed May 13, 2009 4:48 PM, "Steve Bertrand" > scribbled: > >> Hi all, >> >> I'm trying to push a scalar onto an array. The array I'm trying to >> push() to is the first element of another array. I can't figure out what >> I'm missing. It would be appreciated if som

Re: Push to AoA

2009-05-13 Thread Jim Gibson
On 5/13/09 Wed May 13, 2009 4:48 PM, "Steve Bertrand" scribbled: > Hi all, > > I'm trying to push a scalar onto an array. The array I'm trying to > push() to is the first element of another array. I can't figure out what > I'm missing. It would be appreciated if someone could point me in the >

Push to AoA

2009-05-13 Thread Steve Bertrand
Hi all, I'm trying to push a scalar onto an array. The array I'm trying to push() to is the first element of another array. I can't figure out what I'm missing. It would be appreciated if someone could point me in the right direction. if (-e $data_file) { $graph_data = retrieve $data_fil

Re: Help with LWP

2009-05-13 Thread ANJAN PURKAYASTHA
Yes tried the URL; http://www.ncbi.nlm.nih.gov/coreutils/dispatch.cgi. Got a "302 Found at lwp_test.pl line 23" error message. Thanks Anjan On Wed, May 13, 2009 at 5:57 PM, Dermot wrote: > 2009/5/13 Jim Gibson : > > On 5/13/09 Wed May 13, 2009 2:17 PM, "ANJAN PURKAYASTHA" > > scribbled: > > >

Re: Help with LWP

2009-05-13 Thread Dermot
2009/5/13 Jim Gibson : > On 5/13/09 Wed  May 13, 2009  2:17 PM, "ANJAN PURKAYASTHA" > scribbled: > >> Hi, >> >> if ($response->is_success) { >>      print $response->content()."\n";  # or whatever >>  } >>  else { >>      die $response->status_line; >>  } >> >> All this script returns is the NCBI

Re: Help with LWP

2009-05-13 Thread Jim Gibson
On 5/13/09 Wed May 13, 2009 2:17 PM, "ANJAN PURKAYASTHA" scribbled: > Hi, > Here is a beginner's LWP code that is not working. The script is supposed to > query the NCBI website with a user defined term: tuberculosis. The term is > entered into a search box. The user chooses a database from a

Re: Help with LWP

2009-05-13 Thread Gunnar Hjalmarsson
ANJAN PURKAYASTHA wrote: Hi, Here is a beginner's LWP code that is not working. The script is supposed to query the NCBI website with a user defined term: tuberculosis. The term is entered into a search box. The user chooses a database from a drop-down menu and then hits the Search button. Here

Help with LWP

2009-05-13 Thread ANJAN PURKAYASTHA
Hi, Here is a beginner's LWP code that is not working. The script is supposed to query the NCBI website with a user defined term: tuberculosis. The term is entered into a search box. The user chooses a database from a drop-down menu and then hits the Search button. Here is the code: #!/usr/bin/per

deleting subdirectories only in Win32

2009-05-13 Thread Tony Esposito
Hello,   When trying to delete subdirectories and their files on WinXP SP3, the following code also removes the root directory of the subdirectories.  Can I get some assistance?  I want to keep C:\my\data intact but I am losing the \data folder # # Code to remove all files and subdirectories un

Re: Array Initialization

2009-05-13 Thread Gunnar Hjalmarsson
Chas. Owens wrote: On Wed, May 13, 2009 at 01:59, John W. Krahn wrote: snip What's your point? I am trying to understand what point you are trying to make. snip I believe the point is that declaration is only one of the things my does, so saying that "my() happens when the code is compiled s

Re: How does printf able to receive a pointer when passing it a string constant?

2009-05-13 Thread Jim Gibson
On 5/13/09 Wed May 13, 2009 4:48 AM, "Michael Alipio" scribbled: > I have a c code that looks like this: > > #include > > main (){ > char girl[] = "anna"; > char boy[] = "jude"; > stringcopy(boy, girl); /* copy boy to girl */ > printf("%s", girl); > > } > > void stringcopy(char *b, char *g)

Re: How does printf able to receive a pointer when passing it a string constant?

2009-05-13 Thread Chas. Owens
On Wed, May 13, 2009 at 07:48, Michael Alipio wrote: > > > I have a c code that looks like this: And C isn't Perl, perhaps you should ask these sort of questions on a C list or newsgroup[1]? Or maybe Stack Overflow[2]? snip > However if I replace the stringcopy call arguments with "jude", "anna

How does printf able to receive a pointer when passing it a string constant?

2009-05-13 Thread Michael Alipio
I have a c code that looks like this: #include main (){ char girl[] = "anna"; char boy[] = "jude"; stringcopy(boy, girl); /* copy boy to girl */ printf("%s", girl); } void stringcopy(char *b, char *g){ while ((*g++ = *b++) != '\0') ; } It prints fine... However if I replace the stringcopy

Re: Testing a scalier for two possible values at once

2009-05-13 Thread John W. Krahn
Adam Jimerson wrote: I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just gave

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Paul Johnson
On Wed, May 13, 2009 at 11:25:40AM +0200, Alexander Koenig wrote: > You wrote on 05/13/2009 02:17 AM: > > I need to test a scalier to see if its value is not two possibilities, > > because this test is being done inside a while loop I can not use an elsif > > statement without things getting ugly

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Alexander Koenig
You wrote on 05/13/2009 02:17 AM: > I need to test a scalier to see if its value is not two possibilities, > because this test is being done inside a while loop I can not use an elsif > statement without things getting ugly. I have tried it like this if > ($scalier nq 'A') || ($scalier nq 'B')

Testing a scalier for two possible values at once

2009-05-13 Thread Adam Jimerson
I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just gave me a syntax error wh