Re: Polyline

2007-06-14 Thread Prabu Ayyappan
Hi, The GD module may not be installed properly. if you are using active perl then did you install the module via ppm: C:\> ppm ppm> install GD if you didn't use activestate, then using cygwin. perl -MCPAN -e 'install GD" if you are get installed the module in some other path the

Polyline

2007-06-14 Thread Geetha
Dear all, I installed GD::Graph module. I followed following method. cpan> install GD::Graph Then I got the following messages: CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on .. GD::Graph is up to date. But when I tried using this module, it r

dynamic loading option?

2007-06-14 Thread Ravi Malghan
A module is requiring that my perl be compiled with dynamic loading. I have installed perl from a binary. How do I figure out if my perl has the dynamic loading option? bash-2.05$ perl -V Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=solaris, osver

Re: using a homemade perl module

2007-06-14 Thread Mathew Snyder
I fixed all of the bugs save one. I can't access any of my subroutines without explicitly using it with dates_emails::subroutine. I was under the impression that if I was exporting them all from the module, the subroutine would be found regardless. package dates_emails; require Exporter; use str

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
Sure enough. I must have typo'ed it before. Now it works just like you say it should. Thanks Mathew Keep up with me and what I'm up to: http://theillien.blogspot.com Chas Owens wrote: > On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> I did this and set $Data::Dumper::Useqq = 1; this wa

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: I did this and set $Data::Dumper::Useqq = 1; this was the result: $VAR1 = { "" => 7, }; Nothing there. Does this mean I just have an empty string with neither a NUL value or anything else for that matter (physicists would be

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
I did this and set $Data::Dumper::Useqq = 1; this was the result: $VAR1 = { "" => 7, }; Nothing there. Does this mean I just have an empty string with neither a NUL value or anything else for that matter (physicists would be boggled ;) )? Mathew Keep up with me and what I'm up

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew <[EMAIL PROTECTED]> wrote: The purpose of getting the data in the first place is to allow my boss to see that people are still not doing things they are supposed to. He can then send out reminders so we can establish better habits. My plan is to replace the null value with a

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Erk...nevermind. didn't realize that was a continuance from the line above it. Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $D

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
The purpose of getting the data in the first place is to allow my boss to see that people are still not doing things they are supposed to. He can then send out reminders so we can establish better habits. My plan is to replace the null value with a description making it obvious that the value had

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Ray
On Jun 14, 11:17 am, [EMAIL PROTECTED] (Chas Owens) wrote: > Do you mean like this? > > #!/usr/bin/perl > > use strict; > use warnings; > > use XML::Simple; > > my $xml = XMLin(join "", ); > > for my $rec (@{$xml->{RejectRecord}}) { > printf qq(customer %-9.9s had error %d "%s"\n), >

Re: 'Keys' Question

2007-06-14 Thread [EMAIL PROTECTED]
Actually, it turns out the version in question is NOT in production. Someone (before my time) put a new, nonfunctioning version in PVCS. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Looks like there's an extra single quote after Dumper(\%h); Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $Data::Dumper::Useqq t

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Chas Owens
On 6/14/07, Ray <[EMAIL PROTECTED]> wrote: snip Oh, one other thing.. What If I wanted to iterate over the "Code" tag as well? Notice there is 2 Code tags that mean different things. One is the Customer unique identifier ("LarryBoy") and the other is the Reject Code ("1234"). I am interested in i

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Ray
On Jun 14, 6:26 am, [EMAIL PROTECTED] (Chas Owens) wrote: > > However, I bet you want to iterator over all of the contents of the > RejectRecord key like this > > my $max = @{$ref->{RejectRecord}}; > for my $i (1 .. $max) { > print "record $i of $max failed because > $ref->{RejectRecord}[$i-1]{

Re: Database insertion, escape issue

2007-06-14 Thread Northstardomus
On Jun 14, 6:59 am, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > From: Northstardomus <[EMAIL PROTECTED]> > > > ... > > $dbh->prepare('INSERT INTO area_status (areaID, survey_date, > > update_time, status ) VALUES (?,?,?,?)'); > > $dbh->execute('$values[0]', '$values[1]', '$values[2]

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Chas Owens
On 6/14/07, Ray <[EMAIL PROTECTED]> wrote: On Jun 14, 6:26 am, [EMAIL PROTECTED] (Chas Owens) wrote: > > However, I bet you want to iterator over all of the contents of the > RejectRecord key like this > > my $max = @{$ref->{RejectRecord}}; > for my $i (1 .. $max) { > print "record $i of $max

Re: 'Keys' Question

2007-06-14 Thread Chas Owens
On 6/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: On Jun 14, 7:59 am, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > Most likely the second line should look like this: > > @TablePreReq = keys(%{$ConfigFile{InputDataFile}}); This gets it to compile. I was a bit puzzled because this code i

Re: Removing decimal points

2007-06-14 Thread ash
Thank you all! I used POSIX floor() and ceil(). Thanks for all the suggestion. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Ray
On Jun 14, 6:26 am, [EMAIL PROTECTED] (Chas Owens) wrote: > > However, I bet you want to iterator over all of the contents of the > RejectRecord key like this > > my $max = @{$ref->{RejectRecord}}; > for my $i (1 .. $max) { > print "record $i of $max failed because > $ref->{RejectRecord}[$i-1]{

Re: 'Keys' Question

2007-06-14 Thread [EMAIL PROTECTED]
On Jun 14, 7:59 am, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > Most likely the second line should look like this: > > @TablePreReq = keys(%{$ConfigFile{InputDataFile}}); This gets it to compile. I was a bit puzzled because this code is in production (apparently as is in the original) but it w

Re: Having trouble porting an application to MS-Windows

2007-06-14 Thread Chas Owens
On 6/14/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote: snip > Can I also send it a signal to > wake it up from another process? In theory you should be able to use kill to send the ALRM signal to another process. I have not tried it. snip Look

Re: Having trouble porting an application to MS-Windows

2007-06-14 Thread Chas Owens
On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote: snip Assuming I can update to ActivePerl 5.8.8.820, if I set an alarm in one forked process (thread?) before calling sysread() or sleep() on Win32, will the same process receive the wakeup? Looks like yes: #!/usr/bin/perl use strict; use war

RE: Having trouble porting an application to MS-Windows

2007-06-14 Thread Bob McConnell
> -Original Message- > From: Chas Owens [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 14, 2007 12:10 PM > To: Bob McConnell > Cc: beginners@perl.org > Subject: Re: Having trouble porting an application to MS-Windows > > On 6/14/07, Chas Owens <[EMAIL PROTECTED]> wrote: > > On 6/14/07,

Re: Having trouble porting an application to MS-Windows

2007-06-14 Thread Chas Owens
On 6/14/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote: > In "perlport - Writing portable Perl" in the Alphabetic list of Perl > Functions: > > alarm SECONDS > alarm > Not implemented. (Win32) > > I couldn't find anything in the ActiveState relea

Re: Having trouble porting an application to MS-Windows

2007-06-14 Thread Chas Owens
On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote: In "perlport - Writing portable Perl" in the Alphabetic list of Perl Functions: alarm SECONDS alarm Not implemented. (Win32) I couldn't find anything in the ActiveState release notes that contradicted that. snip > the latest version of

RE: Having trouble porting an application to MS-Windows

2007-06-14 Thread Bob McConnell
In "perlport - Writing portable Perl" in the Alphabetic list of Perl Functions: alarm SECONDS alarm Not implemented. (Win32) I couldn't find anything in the ActiveState release notes that contradicted that. Bob McConnell > -Original Message- > From: Chas Owens [mailto:[EMAIL PROTEC

Re: Having trouble porting an application to MS-Windows

2007-06-14 Thread Chas Owens
On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote snip On the Win32 platform, this form of select is only implemented for sockets, and alarm() is not implemented at all. snip What makes you think the alarm function is not implemented? Running the following code with the latest version of Act

RE: Hash Key is a Null Value

2007-06-14 Thread Xu, Lizhe
Thank you very much, Rob. Lizhe Xu US DHS PIADC PO Box 848 Greenport NY 11944 [EMAIL PROTECTED] Tel: 631 323 3023 fax: 631 323 3295 From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Thu 6/14/2007 10:36 AM To: beginners@perl.org Cc: Xu, Lizhe Subject: Re: Hash Ke

Re: Hash Key is a Null Value

2007-06-14 Thread Rob Dixon
Xu, Lizhe wrote: On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: To force Data::Dumper to do the right thing for the display you must set $Data::Dumper::Useqq to 1. It will then use doublequoted strings and escape characters (like \t, \n, \0 etc). perl -MData::Dumper -e '$Data::Dumpe

Having trouble porting an application to MS-Windows

2007-06-14 Thread Bob McConnell
Good morning, The code listed below is part of a link level serial protocol that doesn't port to Win32. A framed message with a checksum is sent and then a single character response (ACK or NAK) is expected in return. On the Win32 platform, this form of select is only implemented for sockets, and

RE: Hash Key is a Null Value

2007-06-14 Thread Xu, Lizhe
On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: > To force Data::Dumper to do the right thing for the > display you must set $Data::Dumper::Useqq to 1. It will then use > doublequoted strings and escape characters (like \t, \n, \0 etc). > > perl -MData::Dumper -e '$Data::Dumper::Useqq =

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: > To force Data::Dumper to do the right thing for the > display you must set $Data::Dumper::Useqq to 1. It will then use > doublequoted strings and escape characters (like \t, \n, \0 etc). > > perl -MData::Dumper -e '$Data::Dumper::Useqq =

Re: Removing decimal points

2007-06-14 Thread Chas Owens
On 6/14/07, yitzle <[EMAIL PROTECTED]> wrote: On 6/13/07, Brad Baxter <[EMAIL PROTECTED]> wrote: > On Jun 8, 3:52 pm, [EMAIL PROTECTED] (Ash) wrote: > > Hello there! > > > > I need to remove decimal points from numbers. For eg 1.23 or 1.77 > > would be just 1. Any suggestion is appreciated. Thank

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Chas Owens
On 6/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi I'm struggling with the use of XML::Simple so was hoping that someone might be able to help me. I'm kind of new to perl, especially when dealing with hash references. I would like to iterate through the hash that is created by the XMLIn

Re: Removing decimal points

2007-06-14 Thread yitzle
On 6/13/07, Brad Baxter <[EMAIL PROTECTED]> wrote: On Jun 8, 3:52 pm, [EMAIL PROTECTED] (Ash) wrote: > Hello there! > > I need to remove decimal points from numbers. For eg 1.23 or 1.77 > would be just 1. Any suggestion is appreciated. Thank you. Did anybody mention int()? -- Brad The first 6

Re: Help with writing SSH script without Net::SSH::Perl module

2007-06-14 Thread Chas Owens
On 6/14/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 6/14/07, Clif Hudson <[EMAIL PROTECTED]> wrote: > Could someone point me to a book or online reference that shows me how to > create a SSH script from scratch. I know I could use the Net::SSH::Perl > module, but I don't have access to the exte

Re: Help with writing SSH script without Net::SSH::Perl module

2007-06-14 Thread Chas Owens
On 6/14/07, Clif Hudson <[EMAIL PROTECTED]> wrote: Could someone point me to a book or online reference that shows me how to create a SSH script from scratch. I know I could use the Net::SSH::Perl module, but I don't have access to the external resources needed to download the module because of

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Paul Lalli <[EMAIL PROTECTED]> wrote: snip Have you tried examining your hash using Data::Dumper, to see what's *really* in it? use Data::Dumper; print Dumper(\%hash); snip You cannot always trust the output of Data::Dumper when it is printed. For instance, if I showed you the foll

Re: Regading 'perlipc'

2007-06-14 Thread Paul Lalli
On Jun 14, 6:54 am, [EMAIL PROTECTED] (Anand Kumar) wrote: > I would like to know if there is any possibilty to handle a situation where > in while executing a perl script if i press a Control-C (or terminate the > execution explicitly) then my code should be in a position to handle it and > d

Help with writing SSH script without Net::SSH::Perl module

2007-06-14 Thread Clif Hudson
Could someone point me to a book or online reference that shows me how to create a SSH script from scratch. I know I could use the Net::SSH::Perl module, but I don't have access to the external resources needed to download the module because of the network restrictions. Sincerely, Clif Hudson [E

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 8:03 am, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > Date sent: Thu, 14 Jun 2007 06:29:56 -0400 > From: Mathew Snyder <[EMAIL PROTECTED]> > To: Perl Beginners <[EMAIL PROTECTED]> > Subject:Hash Key is a Null Value > > > I

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 6:29 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: > I'm building a hash using values from a database backend to an application we > use in house. The application has a field which contains a customer name. > This > values is supposed to be set by the person handling the work but somet

Re: Regading 'perlipc'

2007-06-14 Thread Jeff Pang
anand kumar 写道: Hi all, I would like to know if there is any possibilty to handle a situation where in while executing a perl script if i press a Control-C (or terminate the execution explicitly) then my code should be in a position to handle it and display a predefined message(or specifical

Re: Hash Key is a Null Value

2007-06-14 Thread Martin Barth
Hi as far as I know hash keys must be strings. So there simply can't be a undef() as a hashkey. to prove what I said: % perl -MData::Dumper -le '$hash{undef()} = "foo"; $hash{""} = "bar"; print Dumper \%hash' $VAR1 = { '' => 'bar' }; HTH Martin On Thu, 14 Jun 2007 14:03:10

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: I'm building a hash using values from a database backend to an application we use in house. The application has a field which contains a customer name. This values is supposed to be set by the person handling the work but sometimes doesn't ge

Re: Hash Key is a Null Value

2007-06-14 Thread Jenda Krynicky
Date sent: Thu, 14 Jun 2007 06:29:56 -0400 From: Mathew Snyder <[EMAIL PROTECTED]> To: Perl Beginners Subject:Hash Key is a Null Value > I'm building a hash using values from a database backend to an application we > use in house.

Re: 'Keys' Question

2007-06-14 Thread Jenda Krynicky
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > New to perl (old to Ada, C, C++, COBOL, .) I'm looking at some > existing code. > > read_config ('../config/legacyload.cfg', %ConfigFile); > @TablePreReq = keys(%ConfigFile{InputDataFile}); > > > When I run it I get the error

Re: Database insertion, escape issue

2007-06-14 Thread Jenda Krynicky
From: Northstardomus <[EMAIL PROTECTED]> > ... > $dbh->prepare('INSERT INTO area_status (areaID, survey_date, > update_time, status ) VALUES (?,?,?,?)'); > $dbh->execute('$values[0]', '$values[1]', '$values[2]', > '$values[3]'); Apart from the $sth already explained by others, ther

Re: regexp problem

2007-06-14 Thread Rob Dixon
Jorge Almeida wrote: I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n"; When input is 'a123b', I get '123b', but I expected '123'. I know I can substitute line 4 by '$s=~s/\D*//g;' and comment out lin

Re: Regading 'perlipc'

2007-06-14 Thread Martin Barth
Hi, There is a %SIG hash with several signal handlers in it. you can overwrite the signal handler for C-c and write your own stuff there. usually you should just set a variable to true. eg. $abort = 1; your programm should poll the var. (for example in the main loop, if there's something like tha

Re: regexp problem

2007-06-14 Thread Xavier Noria
On Jun 14, 2007, at 12:49 PM, Jorge Almeida wrote: Martin was right (and I should have seen it from the start). The "will go ahead as much as possible" is true only in the sense that the greatest possible string of non-digits will be selected for deletion. With '$s=~s/\D*//;' in line 5 that stri

Regading 'perlipc'

2007-06-14 Thread anand kumar
Hi all, I would like to know if there is any possibilty to handle a situation where in while executing a perl script if i press a Control-C (or terminate the execution explicitly) then my code should be in a position to handle it and display a predefined message(or specifically execute predefi

Re: regexp problem

2007-06-14 Thread Jorge Almeida
On Thu, 14 Jun 2007, Xavier Noria wrote: On Jun 14, 2007, at 12:10 PM, Martin Barth wrote: On Thu, 14 Jun 2007 11:04:51 +0100 (WEST) Jorge Almeida <[EMAIL PROTECTED]> wrote: > I'm missing something about Perl's regexp: > >1 #!/usr/bin/perl -w >2 use strict; >3 my $s=; >4 $s=

Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
I'm building a hash using values from a database backend to an application we use in house. The application has a field which contains a customer name. This values is supposed to be set by the person handling the work but sometimes doesn't get done. This leaves a NULL value in the database which

Re: regexp problem

2007-06-14 Thread Xavier Noria
On Jun 14, 2007, at 12:10 PM, Martin Barth wrote: On Thu, 14 Jun 2007 11:04:51 +0100 (WEST) Jorge Almeida <[EMAIL PROTECTED]> wrote: I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n"; When in

Re: using a homemade perl module

2007-06-14 Thread Mathew Snyder
That worked. Thanks. Now I just need to figure out all of the undeclared variables ;) Mathew Keep up with me and what I'm up to: http://theillien.blogspot.com Martin Barth wrote: > Hi, > > try: > > use lib "/usr/local/bin/lib/"; > use dates_email; > > HTH Martin > > On Thu, 14 Jun 2007 01:

Re: regexp problem

2007-06-14 Thread Jorge Almeida
On Thu, 14 Jun 2007, Martin Barth wrote: On Thu, 14 Jun 2007 11:04:51 +0100 (WEST) Jorge Almeida <[EMAIL PROTECTED]> wrote: I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n"; When input is 'a

Re: Getting a program pid

2007-06-14 Thread Paul Lalli
On Jun 13, 7:32 pm, [EMAIL PROTECTED] wrote: > On Jun 13, 4:10 pm, [EMAIL PROTECTED] (Owen) wrote: > > > I thought there may have been a perl command like "getpid (program)" > > but it doesn't seem so. > > Yeah, sometimes when we make up commands they don't work. > > Try the special variable $$ (pe

Re: regexp problem

2007-06-14 Thread Martin Barth
On Thu, 14 Jun 2007 11:04:51 +0100 (WEST) Jorge Almeida <[EMAIL PROTECTED]> wrote: > I'm missing something about Perl's regexp: > >1 #!/usr/bin/perl -w >2 use strict; >3 my $s=; >4 $s=~s/\D*//; >5 $s=~s/\D*//; >6 print "$s\n"; > > When input is 'a123b', I get '123b', but

Re: regexp problem

2007-06-14 Thread Xavier Noria
On Jun 14, 2007, at 12:04 PM, Jorge Almeida wrote: I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n"; When input is 'a123b', I get '123b', but I expected '123'. s/\D+//g; -- fxn -- To unsubscr

regexp problem

2007-06-14 Thread Jorge Almeida
I'm missing something about Perl's regexp: 1 #!/usr/bin/perl -w 2 use strict; 3 my $s=; 4 $s=~s/\D*//; 5 $s=~s/\D*//; 6 print "$s\n"; When input is 'a123b', I get '123b', but I expected '123'. I know I can substitute line 4 by '$s=~s/\D*//g;' and comment out line 5. It will work then

Re: using a homemade perl module

2007-06-14 Thread Martin Barth
Hi, try: use lib "/usr/local/bin/lib/"; use dates_email; HTH Martin On Thu, 14 Jun 2007 01:50:57 -0400 Mathew Snyder <[EMAIL PROTECTED]> wrote: > To take this further I've changed the code. It now looks like this: > > package dates_emails; > require Exporter; > use strict; > > our @ISA

Re: 'Keys' Question

2007-06-14 Thread Jeff Pang
[EMAIL PROTECTED] 写道: New to perl (old to Ada, C, C++, COBOL, .) I'm looking at some existing code. read_config ('../config/legacyload.cfg', %ConfigFile); @TablePreReq = keys(%ConfigFile{InputDataFile}); When I run it I get the error (v. 5.8.4): syntax error at cut

Re: Removing decimal points

2007-06-14 Thread Brad Baxter
On Jun 8, 3:52 pm, [EMAIL PROTECTED] (Ash) wrote: > Hello there! > > I need to remove decimal points from numbers. For eg 1.23 or 1.77 > would be just 1. Any suggestion is appreciated. Thank you. Did anybody mention int()? -- Brad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: Getting a program pid

2007-06-14 Thread usenet
On Jun 13, 4:10 pm, [EMAIL PROTECTED] (Owen) wrote: > I thought there may have been a perl command like "getpid (program)" > but it doesn't seem so. Yeah, sometimes when we make up commands they don't work. Try the special variable $$ (perldoc perlvar) -- The best way to get a good answer is to

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread Jeff Pang
[EMAIL PROTECTED] 写道: The a sample of the contents of the XML file is found below: Notice that I've hardcode the first reference to Rejected Records by using [0]. Well I need to know how of these there are in the hashref $ref so I can iterate through. Hello, Since you've used Data::Dumper you

Iterate through a hashref using XML::Simple

2007-06-14 Thread olson . ray
Hi, I'm struggling with the use of the XML::Simple package and was hoping to get some help. I'm kind of new to perl, especially dealing with hash references. I would like to be able to iterate through a hashref that is built using XMLin. Here is the code: -- To unsubscribe, e-mail: [EMAIL PROTEC

Iterate through a hashref using XML::Simple (real post)

2007-06-14 Thread olson . ray
Hi I'm struggling with the use of XML::Simple so was hoping that someone might be able to help me. I'm kind of new to perl, especially when dealing with hash references. I would like to iterate through the hash that is created by the XMLIn function. Here is my code: use Env qw(GMNHOME GMNSQLSRV

Re: What happened to Getopt::Std ?

2007-06-14 Thread Miguel Santinho
Em (On) Wed, Jun 13, 2007 at 09:29:27AM -0400, John Peacock escreveu (wrote): > The Kurila project is a fork of Perl5 without the strict backwards > compatibility required of v5.10.0, as a theoretical experiment. You'll note > now that under CPAN, it shows up as Is CPAN (Comprehensive __Perl__

'Keys' Question

2007-06-14 Thread [EMAIL PROTECTED]
New to perl (old to Ada, C, C++, COBOL, .) I'm looking at some existing code. read_config ('../config/legacyload.cfg', %ConfigFile); @TablePreReq = keys(%ConfigFile{InputDataFile}); When I run it I get the error (v. 5.8.4): syntax error at cutover.pl line 318, near "