debugging XS code.

2005-05-09 Thread Rajarshi Das
Hi, I am running perl-5.8.6 on z/OS. How do I debug XS code ? 1) I have a specific function "static SV *encode_method()" in a xs file. The fn name remains the same in the corresponding c file. I am unable to break at this fn within the c file although perl is built with -g. Any thoughts on how t

Question on File::Find.

2005-05-09 Thread arkster
Hi All, I'm trying to find a way to compare the files and folders contained within 2 separate directory structures to determine whether they are identical or not. For this I tried using the File::Find module but got stuck at a certain point. I looked online and in some books but couldnt find a

Re: Where will I find perl scripts

2005-05-09 Thread John W. Krahn
Tielman Koekemoer (TNE) wrote: Thanks all for your info - VERY informative. Although I now feel the need to say: Hang in there Charles. I'm sure not all Perl babes rate their partners according to their scripting prowess. All drop-dead gorgeous Perl programmers, you know who to contact... ;) Than

RE: Where will I find perl scripts

2005-05-09 Thread Tielman Koekemoer \(TNE\)
Thanks all for your info - VERY informative. Although I now feel the need to say: Hang in there Charles. I'm sure not all Perl babes rate their partners according to their scripting prowess. All drop-dead gorgeous Perl programmers, you know who to contact... ;) Thanks again, Tielman -Origi

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
hi john, thanks a lot!! the code worked...:-) On 5/9/05, John Doe <[EMAIL PROTECTED]> wrote: > > Am Montag, 9. Mai 2005 18.52 schrieb Aditi Gupta: > > hi, > > the fields can not be splitted using /s because some fields have common > > boundaries, i.e. some fields are from column 31-38 and the n

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
hi john, thanks a lot!! the code worked...:-) On 5/9/05, John Doe <[EMAIL PROTECTED]> wrote: > > Am Montag, 9. Mai 2005 18.52 schrieb Aditi Gupta: > > hi, > > the fields can not be splitted using /s because some fields have common > > boundaries, i.e. some fields are from column 31-38 and the n

Re: returning a hash from a method call ?

2005-05-09 Thread John Doe
Am Montag, 9. Mai 2005 21.56 schrieb Graeme McLaren: > Hi all, I want to return a hash when calling > $conf->get_users_table_and_columns; Below you say that you don't want to return an ordinary hash... > but when I do: > die Dumper($conf->get_users_table_and_columns); > > I get: > > Software er

a problem about GD

2005-05-09 Thread Frank
Sorry if my question is stupid or too simple. I have google the answer but got too much information I test my GD module to check whether it can be used since there are too many errors when install GD. the test program is copied from a website: ** #!/

Re: Posting Files with HTTP::Request

2005-05-09 Thread John Doe
Am Montag, 9. Mai 2005 20.28 schrieb Jason Williard: > I am trying to write a script that will post a file to another script on > another server via HTTP::Request. I seem to be unsuccessful and was > hoping that someone could point out my mistakes. Here is the code that > I have so far: > > -

Re: seek(FH, 0,0) not working

2005-05-09 Thread N. Ganesh Babu
Hi Mohapatra, The idea of seek after while loop worked fine. Thanks for your help. Regards, Ganesh TapasranjanMohapatra wrote: -Original Message- From: N. Ganesh Babu [mailto:[EMAIL PROTECTED] Sent: Mon 5/9/2005 10:27 AM To: Perl Beginners List Subject: seek(FH, 0,0) not working Dear All, I

Re: sorting a hash

2005-05-09 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Octavian Rasnita" <[EMAIL PROTECTED]>; Sent: Monday, May 09, 2005 4:30 PM Subject: Re: sorting a hash - Original Message - From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: Sent: Monday, May 09, 2005

Re: How to install Gtk2 on Windows XP Pro/ActiveState 5.8+?

2005-05-09 Thread Viren Konde
"zentara" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 8 May 2005 23:53:14 -0600, [EMAIL PROTECTED] (Siegfried > Heintze) wrote: > >>I type >>$ perl -MCPAN -e 'install "Gtk2"' >>I get these errors (below). >>Can someone tell me what I am doing wrong? >> > > Here is a copy

Posting Files with HTTP::Request

2005-05-09 Thread Jason Williard
I am trying to write a script that will post a file to another script on another server via HTTP::Request. I seem to be unsuccessful and was hoping that someone could point out my mistakes. Here is the code that I have so far: --- #!/usr/bin/perl -W use HTTP::Request;

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: "Aditi Gupta" <[EMAIL PROTECTED]>; Sent: Monday, May 09, 2005 5:06 PM Subject: Re: extracting coordinates - Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: Sent: Monday, May 09, 2005 10:41 AM Subject: extracting

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Monday, May 09, 2005 11:52 AM Subject: Re: extracting coordinates hi, the fields can not be splitted using /s because some fields have common boundaries, i.e. some fields are from column 31-38

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: Sent: Monday, May 09, 2005 10:41 AM Subject: extracting coordinates Hi everyone, while(){ my @fields = split /\s/; if (/([-]\d{1,2}\.\d{2,3})\s([-]\d{1,2}\.\d{2,3})\s(\d{1,2}\.\d{2,3})/ and $fields[2] eq "CA"){ print "$1,

Reusing Class::DBI connection

2005-05-09 Thread Wijnand Wiersma
Hi list, first post, I am trying to make Class::DBI and Apache::Session to use the same database connection, and I want to have one place for the rest of the webapplication to ask for a database handle. I have one module named Inferno, this module has to be called by every page and module. The re

Re: sorting a hash

2005-05-09 Thread perlocean
- Original Message - From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: Sent: Monday, May 09, 2005 2:32 PM Subject: sorting a hash Hi, I have a reference to a hash of hashes, something like: my $ref = { c => { name => 'a', age => 20, }, b => { name => 'e', age => 24, }, a => { name => 'z'

Re: Fork - Process ID

2005-05-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: The reason your code prints pid twice, is in the placement of your print statment. Since you placed your print code after your fork statment, both parent and child read that statment. Inside that block Parent will see pid of ' 0 ' for child, which is normaly a condition use

Re: extracting coordinates

2005-05-09 Thread mgoland
- Original Message - From: Aditi Gupta <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 12:52 pm Subject: Re: extracting coordinates > hi, Hello, > the fields can not be splitted using /s because some fields have > common > boundaries, i.e. some fields are from column 31-38 and the next

Re: sorting a hash

2005-05-09 Thread Chris Charley
Hi Teddy This works :-) for (sort byname keys %$ref) { print "$_ has the name $ref->{$_}{name} and has $ref->{$_}{age} years\n"; } sub byname { {$ref->{$a}{name} cmp $ref->{$b}{name}} } Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sorting a hash

2005-05-09 Thread mgoland
- Original Message - From: Octavian Rasnita <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 3:32 pm Subject: sorting a hash > Hi, Hello, > > I have a reference to a hash of hashes, something like: > > my $ref = { > c => { > name => 'a', > age => 20, > }, > b => { > name => 'e', > age =>

returning a hash from a method call ?

2005-05-09 Thread Graeme McLaren
Hi all, I want to return a hash when calling $conf->get_users_table_and_columns; but when I do: die Dumper($conf->get_users_table_and_columns); I get: Software error: $VAR1 = 'column3'; What I really want to see is: $VAR1 = { column3 => 'bla1', key2 => 'bla2' } I don't want to simply return a re

microsoft telnet server problem

2005-05-09 Thread jm
i'm trying to script - using net::telnet - an automated connection to a microsoft telnet server. following the example in the net::telnet documentation, i can get the necessary telnet options set before and just after connecting to the server (environ, echo, escape, etc... options) but the serv

Posting Files with HTTP::Request

2005-05-09 Thread Jason Williard
I am trying to write a script that will post a file to another script on another server via HTTP::Request.  I seem to be unsuccessful and was hoping that someone could point out my mistakes.  Here is the code that I have so far: --- #!/usr/bin/perl -W use HTTP::Request;

sorting a hash

2005-05-09 Thread Octavian Rasnita
Hi, I have a reference to a hash of hashes, something like: my $ref = { c => { name => 'a', age => 20, }, b => { name => 'e', age => 24, }, a => { name => 'z', age => 14, }, }; I want to sort the persons with the codes 'a', 'b', and 'c' by their name, and print something like: "a has the name

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
hi, the fields can not be splitted using /s because some fields have common boundaries, i.e. some fields are from column 31-38 and the next field starts from 39.. As in COLUMNS DATA TYPE FIELD DEFINITION - 1 - 6 Re

Re: extracting coordinates

2005-05-09 Thread mgoland
- Original Message - From: Aditi Gupta <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 11:41 am Subject: extracting coordinates > Hi everyone, Hello Aditi, > > That code is working... > But my specific problem is as follows: > > i have a file in which data is stored as > > HELIX 4 4 V

comparing two lists with hashes

2005-05-09 Thread david cateron
I’m still trying to figure out hashes. My array consists of two elements, the first is a filename and the second is a field in the file. So it looks like this: File1 UserID File1 TextID File1 Field1 File2 UserID File2 TextID File2 Field1 File2 Field2 I

Re: extracting coordinates

2005-05-09 Thread Philip M. Gollucci
Aditi Gupta wrote: if(my $line =~ /^/$a/\s* (\s*\d+) \s*/$c/\s* \d* \w+ \s \w (\s*\d+) \w* (\s*\d*) (\s*\d*) (\s*\d*) (\s*\d*) (\s*\d*) (\w*\s*) (\s*\w*) (\s*\w*)/) Couple things: perldoc perlre perldoc perlop /^/$a/\s* you're not doing a subsitution, you have too many / /^$a\s*

extracting coordinates

2005-05-09 Thread Aditi Gupta
Hi everyone, That code is working... But my specific problem is as follows: i have a file in which data is stored as HELIX 4 4 VAL 74 LEU 84 1 11 CRYST1 33.020 33.750 75.670 90.00 90.00 90.00 P 21 21 21 4 ORIGX1 1.00 0.00 0.00 0.0 ORIGX2 0.00 1.00 0.00 0.0 OR

Re: about substring

2005-05-09 Thread Edward WIJAYA
After second thought This line: my @y = grep { $_ if ($_ =~ /\d+/)} @list; could be simplified with this: my @y = grep { /\d+/ } split(/\s+/,$file); Since grep { $_ if /\d+/ } wouldn't match on 0, but grep /\d+/ would. I'm still wondering how can I do that with "unpack" :-( -- Regards, Edward WIJAY

Re: Fork - Process ID

2005-05-09 Thread mgoland
- Original Message - From: "Paul D. Kraus" <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 10:18 am Subject: Fork - Process ID > Sceniro. > I have many cron jobs that run perl scripts. These perl scripts launch > TbredBasic Applications. The problem I keep finding these processes > hung bu

RE: Fork - Process ID

2005-05-09 Thread Larsen, Errin M HMMA/IT
> -Original Message- > From: Paul D. Kraus [mailto:[EMAIL PROTECTED] > Sent: Monday, May 09, 2005 9:19 AM > To: Perl Beginners List > Subject: Fork - Process ID > > > Sceniro. > I have many cron jobs that run perl scripts. These perl > scripts launch TbredBasic Applications. The probl

Re: about substring

2005-05-09 Thread Edward WIJAYA
On Mon, 09 May 2005 21:34:08 +0800, Aditi Gupta <[EMAIL PROTECTED]> wrote: Can we use substr function for a string like: $file = atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N can the decimal numbers be extracted using $x= substr($file, offset, length) (the exact field lenghts of each f

possible caching problem?

2005-05-09 Thread Graeme McLaren
Hey all, I think I may have some kind of caching problem. When I submit my form and fill out all details except one field (first name) the form should be returned with the value I set in the function below. Anyone have any idea why the form is returning the value that was entered on the form

Re: about substring

2005-05-09 Thread Wiggins d'Anconia
Aditi Gupta wrote: > Hi everybody, > > Can we use substr function for a string like: > $file = atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N > can the decimal numbers be extracted using > $x= substr($file, offset, length) > (the exact field lenghts of each field are known). > > Thanks

Fork - Tracking Hung Process

2005-05-09 Thread Paul D. Kraus
I have several perl scripts that run as cronjobs that launch TBRED basic applications. The problem is one of my many programs is hanging and when it does it keeps eating more and more resources. The other problem is the hung processes will only have BASIC as its description. So I am looking into w

Fork - Process ID

2005-05-09 Thread Paul D. Kraus
Sceniro. I have many cron jobs that run perl scripts. These perl scripts launch TbredBasic Applications. The problem I keep finding these processes hung but I have noway of finding out which program is actually causing the problem. When the tbredbasic application launches the processes name is alwa

about substring

2005-05-09 Thread Aditi Gupta
Hi everybody, Can we use substr function for a string like: $file = atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N can the decimal numbers be extracted using $x= substr($file, offset, length) (the exact field lenghts of each field are known). Thanks in advance.. -- To unsubscribe, e-ma

Comparing Multiple files with single file one by one

2005-05-09 Thread N. Ganesh Babu
Dear All, My requirement is to compare the typing exam results. For Example: 1. 281 and 289 are the text files of the candidates. 2. I am having master.txt 3. I need to compare the 281 with master.txt and get the result. 4. I need to compare the 289 with master.txt and get the result. from the comp

Re: OT: nntp messages

2005-05-09 Thread Ing. Branislav Gerzo
zentara [z], on Monday, May 09, 2005 at 08:26 (-0400) wrote: z> Yes, doh!!! I drank too much beer yesterday (VE Day and Mother's Day) z> :-) I just assumed you meant accessing this group...perl.beginners. :-( that's ok :) z> I get my main news through my ISP, who uses a third party nntp serve

Re: OT: nntp messages

2005-05-09 Thread Ing. Branislav Gerzo
zentara [z], on Monday, May 09, 2005 at 05:14 (-0400) made these points: First, thank you for really nice reply. z> Well, you could use any nntp reader, I use Agent, it runs under Wine(or z> natively on Windows) There is a free version called Free Agent which z> works fine too. Yes, I download t

Re: OT: nntp messages

2005-05-09 Thread Ing. Branislav Gerzo
Owen Cook [OC], on Monday, May 9, 2005 at 18:37 (+1000 (EST)) wrote these comments: OC> I "found" this newsgroup by searching Google a long time ago and it popped OC> up with this newsgroup OC> So go to Google newsgroups and advanced search on perl.beginners and you OC> will get it all OC> If you

Re: OT: nntp messages

2005-05-09 Thread Owen Cook
On Mon, 9 May 2005, Ing. Branislav Gerzo wrote: > a little OT maybe, but anyone knows how to get through nntp (I don't > want web mirror) all messages from comp.lang.perl.moderated ? > My provider doesn't support news server, so I have to use some free. I > found free nntp servers at: http://www.