Re: "system" command help

2005-11-09 Thread Rakesh Mishra
On 11/10/05, Marilyn Sander <[EMAIL PROTECTED]> wrote: > > > On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: > > > The system function call returns a boolean value as return value, I > > don't > > remember if 1 is for fail and 0 for success or viceversa. > > Actually it is not a boolean value. It i

RE: Is it possible with RegEx

2005-11-09 Thread Timothy Johnson
Here's one thought. I know you had in mind one regex, but it works pretty well like this: # my @testNumbers = qw(1453225556 994320100 99887443 1123234499 99298281); foreach(@test

RE: Is it possible with RegEx

2005-11-09 Thread Gilles
No, I would know if "13" (means the 2 characters) are in "123" or "145637" I'm sorry if I did not the problem clear Gilles -Message d'origine- De : Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Envoyé : jeudi 10 novembre 2005 02:43 À : Gilles Cc : beginners perl Objet : Re: Is it possible

Re: "system" command help

2005-11-09 Thread Marilyn Sander
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer. You need to look up t

Re: Is it possible with RegEx

2005-11-09 Thread Jeff 'japhy' Pinyan
On Nov 10, Gilles said: I try do to a < simple > thing : Knowing If a string like "13" exist in a string like "123" Or if "37" exist in "12356789" You're not looking for '13', you're looking for '1..3'. The simplest way to do this is: if ("123" =~ /1.*3/) { print "found 1...3\n

Is it possible with RegEx

2005-11-09 Thread Gilles
Hi, I try do to a < simple > thing : Knowing If a string like "13" exist in a string like "123" Or if "37" exist in "12356789" I tried many solutions, but never found one good so I try to do it with loops which more difficult but not impossible I'd like to know if with RegExp it's more simply

Re: "system" command help

2005-11-09 Thread Pablo Wolter
The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. I think your mistake is the lack of the test construction like if, so if (system("$addgroup \"$group\"") == 0) { ... do something ... } I'm not in a box with perl t

Re: Storing a long value in an int [correction]

2005-11-09 Thread radhika
The problem was actually in our code - SetFlags(). SetFlags(unsigned short flags) which was causing the problem. I changed that to a long, and it works. Sorry for the rather un-informative description. I will try to ask better questions next time. Thanks, -radhika > radhika wrote: >>>Hi, >>>I nee

Re: Storing a long value in an int [correction]

2005-11-09 Thread Bob Showalter
radhika wrote: Hi, I need to set this flag = 0x001 My code is as follows: $flag = OBJ::HALT(0x001); print("setting flag $flag\n"); produces: 65536 But when I say $quote-SetFlag($flag); The flag is being set to 0; Is that a method call? $quote->SetFlag($flag) I don't know what SetF

"system" command help

2005-11-09 Thread heena s
hi, is there any mistake in the script: #ADDING A TOOL GROUP system("$addgroup \"$group\"") == 0 or die "system @args failed: $?" &log_message("the group $group added"); thanks - Yahoo! FareChase - Search multiple tr

RE: help with matching

2005-11-09 Thread Rob.Savino
perldoc -u "output of a command" definitely helped. One more issue I noticed after testing the code was I needed the if statement enclosed within the first set of braces. while (<>) { $user = `echo $_`; $result = `dsquery user -samID $_`; if (!$result) { print "$user\n";

RE: Storing a long value in an int

2005-11-09 Thread Timothy Johnson
Where is the function $quote-SetFlag() coming from? -Original Message- From: radhika [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 12:56 PM To: beginners@perl.org Cc: [EMAIL PROTECTED] Subject: Storing a long value in an int $flag = 0x001; print("setting flag $fla

Re: Storing a long value in an int [correction]

2005-11-09 Thread radhika
> Hi, > I need to set this flag = 0x001 > My code is as follows: > > $flag = OBJ::HALT(0x001); > print("setting flag $flag\n"); > produces: 65536 > But when I say $quote-SetFlag($flag); > The flag is being set to 0; > > I see that the number I am trying to set is 65536. > Is there a way I

Storing a long value in an int

2005-11-09 Thread radhika
Hi, I need to set this flag = 0x001 My code is as follows: $flag = 0x001; print("setting flag $flag\n"); produces: 65536 But when I say $quote-SetFlag($flag); The flag is being set to 0; I see that the number I am trying to set is 65536. Is there a way I can make $flag a long int to store

Re: help with matching

2005-11-09 Thread Jay Savage
On 11/9/05, Ryan Frantz <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: Rob.Savino [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, November 09, 2005 1:50 PM > > To: beginners@perl.org > > Subject: help with matching > > > > > > I'm working on a simple script to get a list of

Re: help with matching

2005-11-09 Thread Marilyn Sander
Hello, Rob. On Nov 9, 2005, at 10:49 AM, Rob.Savino wrote: I'm working on a simple script to get a list of users who do not exist while (<>) { At this point, $_ ends with "\n". $user = system("echo $_"); This statement will set $user to the returned value from system(), which wi

RE: help with matching

2005-11-09 Thread Ryan Frantz
> -Original Message- > From: Rob.Savino [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 09, 2005 1:50 PM > To: beginners@perl.org > Subject: help with matching > > > I'm working on a simple script to get a list of users who do not exist > > while (<>) { > $user = system("ec

Re: help with matching

2005-11-09 Thread Wiggins d'Anconia
Rob.Savino wrote: > I'm working on a simple script to get a list of users who do not exist > > while (<>) { > $user = system("echo $_"); > $result = system("dsquery user -samID $_"); > } > if (!$result) { > print "$user\n"; > } > > Here is my problem, > > dsquery user -samID sh

help with matching

2005-11-09 Thread Rob.Savino
I'm working on a simple script to get a list of users who do not exist while (<>) { $user = system("echo $_"); $result = system("dsquery user -samID $_"); } if (!$result) { print "$user\n"; } Here is my problem, dsquery user -samID should return nothing if a user does no

threading stability concerns

2005-11-09 Thread Pete Emerson
I'd love to take advantage of threading in my production environment. The local perl expert cautions that '"common" knowledge is that threads in perl are not production ready - i.e. are not very stable'. perldoc perlthrtut says that the older threading (5.005) was buggy, ithreads has been

XML Question using XML::Element

2005-11-09 Thread Angerstein
I am fresh to the new glorious World of XML, and trying to figure out how this stuff melds together with perl. I found http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html could somebody look over my code analysis and tell me if I am (nearly) right? require "files/camelid_links.pl"; # Needs th

Re: Error in module?

2005-11-09 Thread Bob Showalter
Octavian Rasnita wrote: Hi, I have tried the following test program: use Finance::QuoteHist; $q = Finance::QuoteHist->new ( symbols=> [qw(IBM)], start_date => '01/01/1999', end_date => 'today', ); __END__ The program prints the following error: ERROR: Date::Manip unable to determine T

Re: Connecting to a database using perl

2005-11-09 Thread Bob Showalter
Manish Uskaikar wrote: Hi, I am a real newbie to databases and perl can anyone of you help me with the packages i need to install and the sequences of functions i need to make to connect to a database and fire queries. DBI is the recommended approach for accessing SQL databases. You need the

Error in module?

2005-11-09 Thread Octavian Rasnita
Hi, I have tried the following test program: use Finance::QuoteHist; $q = Finance::QuoteHist->new ( symbols=> [qw(IBM)], start_date => '01/01/1999', end_date => 'today', ); __END__ The program prints the following error: ERROR: Date::Manip unable to determine TimeZone. at D:/usr/site/l