buffered output?

2003-11-20 Thread Bryan Harris
I have an odd problem... I have a perl script that execs another program: $cmd = "motuds t1.dat t2.dat t3.dat > out1"; exec $cmd; Motuds takes awhile to run, though, and I often want to see how it's doing: % tail -f out1 The problem is, the output of motuds is not getting written out to the

Re: What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread John W. Krahn
Jeff Kowalczyk wrote: > > I'm not yet able to read certain parts of perl code. What is this > comparison/alternation after the hash lookup on 'otherid' called, and what > does the code do? > > $myvar->{id} = ($myvar->{otherid}) ? 'stringA' : 'stringB'; perldoc perlop [snip] Conditional Op

OLE Hash problem getting AD lastLogon

2003-11-20 Thread Tim Johnson
I'm having trouble getting the lastLogon property of a user in AD using Perl and LDAP. Below is my code. The problem is that I keep getting a blessed Win32::OLE hash returned instead of a number when returning the value of lastLogon. The "hash" has no keys, so I think this might be a mismapping

Re: Fedora and Findmodules Script

2003-11-20 Thread Clint
Ah that's what's up! The findmodules script is only finding those modules installed with the new version of Perl (5.8.1) that came on FC1! How can I modify the findmodules script to find modules that are available for use, even if I brought them in via CPAN using a prior version of Perl? Which

Re: best beginning perl book is?

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 13:20 US/Pacific, Eric Greene wrote: [..] thanks for any suggestions. I am a programming novice. A fun place to start on the web - for perl stuff is There is the Or you might just go with say

best beginning perl book is?

2003-11-20 Thread Eric Greene
thanks for any suggestions. I am a programming novice.

Re: using perl interpreter interactively like python?

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 11:25 US/Pacific, Jeff Kowalczyk wrote: [..] I'd like to open perl and execute a few commands interactively in the console. I learn a lot in python this way, and I need to understand some perl code. Did this kind of thing ever get added to perl? [..] first off compli

Re: pagination of dbi results on html browser

2003-11-20 Thread A L
I just want to say thank you to everyone with their help and support. Now, I'm returning to my programming. I'll come back when I have results. Angela - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard

Re: What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 12:18 US/Pacific, Jeff Kowalczyk wrote: I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar->{id} = ($myvar->{otherid}) ? 'stringA' : 'stringB'; it is

Re: What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Kevin Old
On Thu, 2003-11-20 at 15:18, Jeff Kowalczyk wrote: > I'm not yet able to read certain parts of perl code. What is this > comparison/alternation after the hash lookup on 'otherid' called, and what > does the code do? > > $myvar->{id} = ($myvar->{otherid}) ? 'stringA' : 'stringB'; > > Thanks. Jeff

Re: What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Morbus Iff
>I'm not yet able to read certain parts of perl code. What is this >comparison/alternation after the hash lookup on 'otherid' called, and what >does the code do? > > $myvar->{id} = ($myvar->{otherid}) ? 'stringA' : 'stringB'; It's a "ternary" or "flip-flop" statement. In this case, the above is th

Re: using Getopt with subroutines

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 11:10 US/Pacific, Freimuth,Robert wrote: [..] Excellent suggestion! I should have thought of that before. (I can tell I'm tired...) Passing a hash would solve both the required/optional and parameter order problem. [..] hash is your friend. Hash References are Coole

Re: Pointers

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 11:51 US/Pacific, Eric Walker wrote: Well see the key is I am passing a value to a sub this is a pointer and I am having trouble getting access to the hash with in the subroutine $Rules is a pointer given to me by a prewritten Database function. &sub(\$Rules); do yo

Re: using perl interpreter interactively like python?

2003-11-20 Thread Dan Anderson
On Thu, 2003-11-20 at 14:25, Jeff Kowalczyk wrote: > I'd like to open perl and execute a few commands interactively in the > console. I learn a lot in python this way, and I need to understand some > perl code. Did this kind of thing ever get added to perl? I assume you're talking about how you ca

What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Jeff Kowalczyk
I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar->{id} = ($myvar->{otherid}) ? 'stringA' : 'stringB'; Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

RE: Pointers

2003-11-20 Thread Paul Kraus
Send the code. -Original Message- From: Eric Walker [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 2:52 PM To: Perl Newbies Subject: RE: Pointers Well see the key is I am passing a value to a sub this is a pointer and I am having trouble getting access to the hash with in th

Re: using perl interpreter interactively like python?

2003-11-20 Thread Jenda Krynicky
From: Jeff Kowalczyk <[EMAIL PROTECTED]> > I'd like to open perl and execute a few commands interactively in the > console. I learn a lot in python this way, and I need to understand > some perl code. Did this kind of thing ever get added to perl? Apart from the "debug session" explained in the pr

Re: using perl interpreter interactively like python?

2003-11-20 Thread david
Jeff Kowalczyk wrote: > I'd like to open perl and execute a few commands interactively in the > console. I learn a lot in python this way, and I need to understand some > perl code. Did this kind of thing ever get added to perl? yes but probably not in a sense that you expect it. the perl debugge

RE: Pointers

2003-11-20 Thread Eric Walker
Well see the key is I am passing a value to a sub this is a pointer and I am having trouble getting access to the hash with in the subroutine $Rules is a pointer given to me by a prewritten Database function. &sub(\$Rules); I am actually passing in 2 hashes and need to compare the keys. so I am

RE: Pointers

2003-11-20 Thread Daniel Staal
--As off Thursday, November 20, 2003 12:20 PM -0700, Eric Walker is alleged to have said: ok why the $$ instead of the %$? sorry confused. On Thu, 2003-11-20 at 12:08, Paul Kraus wrote: $$overdate{key} Perldoc perlref --As for the rest, it is mine. $$ would get you the value of a cert

RE: Pointers

2003-11-20 Thread Eric Walker
wow ok then I will try and use the -> notation. No need to stay behind the times. On Thu, 2003-11-20 at 12:23, Bakken, Luke wrote: > ok why the $$ instead of the %$? > > sorry confused. > > \%overData. Now how do > I access this hash. %$overData? Because

RE: Pointers

2003-11-20 Thread Eric Walker
ok that explains it.. Thanks newbie not confused for the moment On Thu, 2003-11-20 at 12:23, Paul Kraus wrote: Forget about references for a minute. %hash <- refers to the entire hash. $hash{key} refers to one element of that hash. So as a reference you would

using perl interpreter interactively like python?

2003-11-20 Thread Jeff Kowalczyk
I'd like to open perl and execute a few commands interactively in the console. I learn a lot in python this way, and I need to understand some perl code. Did this kind of thing ever get added to perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: Pointers

2003-11-20 Thread Paul Kraus
Forget about references for a minute. %hash <- refers to the entire hash. $hash{key} refers to one element of that hash. So as a reference you would address the entire hash as %$hashref Or a single element of that hash as $$hashref{key} HTH Paul -Original Message- From: Eric Walker [m

RE: Pointers

2003-11-20 Thread Bakken, Luke
> ok why the $$ instead of the %$? > > sorry confused. > > \%overData. Now how do > I access this hash. %$overData? Because you're in essence doing this: ${ $overdata }{$key} When you access a hash value, you're getting a scalar, which is why you use a $. Perhaps this notation would be c

RE: Pointers

2003-11-20 Thread Eric Walker
ok why the $$ instead of the %$? sorry confused. On Thu, 2003-11-20 at 12:08, Paul Kraus wrote: $$overdate{key} Perldoc perlref -Original Message- From: Eric Walker [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 2:03 PM To: perlgroup Su

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Paul Kraus
>Don't put it in a directory whose path has spaces in it. Just put it in c:\windows or c:\winnt or something >:-) >Also, have you set up the .pl extension correctly? If so and it still doesn't work, try calling perl >>.explicitly on the .pl file with a full path to the perl executable. Ok new erro

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Paul Kraus
>How does the system store the data? If they have it in a MS Access >(.mdb), dBase or FoxBase (.dbf) or Paradox (.db) it might be quicker >to access the data directly via DBI+DBD::ODBC or DBI+DBD::XBase and >generate the report yourself in whatever format you need. >Been there, done that. Some

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Bakken, Luke
> Almost forgot this is plain text data. > > >http://www.cs.wisc.edu/~ghost/redmon/ > >Use redmon to set up a re-direct port. Redirect to a perl > program that > >opens a file for append and appends >the print data to it. If you're > opening the data in MS Word (I can't tell from your description

RE: Pointers

2003-11-20 Thread Paul Kraus
$$overdate{key} Perldoc perlref -Original Message- From: Eric Walker [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 2:03 PM To: perlgroup Subject: Pointers Hello all, newbie here got a few questions: I am working with pointers and I sort of understand them and then I don'

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Paul Kraus
Almost forgot this is plain text data. >http://www.cs.wisc.edu/~ghost/redmon/ >Use redmon to set up a re-direct port. Redirect to a perl program that >opens a file for append and appends >the print data to it. If you're opening the data in MS Word (I can't tell from your description if you >are)

FW: RE: Strange characters

2003-11-20 Thread david
David O'Connor wrote: > > stop using cygwin. i find it rather problematic and funny > (especialy if you> size the window.) if you do not have ready access to a > linux box, download, burn, and run knoppix. i have never had a problem on > knoppix > > davidO > > p.s. > > or try opti-perl David,

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Paul Kraus
>http://www.cs.wisc.edu/~ghost/redmon/ >Use redmon to set up a re-direct port. Redirect to a perl program that opens a file for append and appends >the print data to it. If you're opening the data in MS Word (I can't tell from your description if you >are) you can use OLE to automate printing in Wo

RE: How does perl compile functions

2003-11-20 Thread Hanson, Rob
> When the actual C code (or ASM equivalent or > bytecode or whatever Perl uses) for a > function is run, is there overhead to the > function? I'm no internals expert, but I would say yes, there is some overhead. The overhead has to deal with pushing aliases of the passed params onto the @_ array

Pointers

2003-11-20 Thread Eric Walker
Hello all, newbie here got a few questions: I am working with pointers and I sort of understand them and then I don't. I understand that instead of making a variable for a particular value you can use a pointer to access the same data. So the new variable stores the pointer to the old data. ie..

Re: How does perl compile functions

2003-11-20 Thread david
Dan Anderson wrote: > I'm curious how perl "compiles" functions internally. When the actual C > code (or ASM equivalent or bytecode or whatever Perl uses) for a > function is run, is there overhead to the function? Are functions what do you mean by "overhead to the function"? > inlined? if yo

RE: Strange characters

2003-11-20 Thread LoBue, Mark
> -Original Message- > From: david [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 20, 2003 10:06 AM > To: [EMAIL PROTECTED] > Subject: RE: Strange characters > > > Chetak Sasalu wrote: > > > > > Hi, > > > > I tried "export LANG=en_US" . But the esc characters > remain. Cygwin i

Re: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > Ok I am in a crunch situation. I have to gather a report from a credit > card system. The system is archaic and runs on windows. On this > software I have to go in for each day since January and print a report > ( you can not do this as a batch :( gr som

RE: How does perl compile functions

2003-11-20 Thread Bob Showalter
Dan Anderson wrote: > I'm curious how perl "compiles" functions internally. When > the actual C > code (or ASM equivalent or bytecode or whatever Perl uses) for a > function is run, is there overhead to the function? Are functions > inlined? perldoc perlguts exaplains a lot of that stuff. > D

Re: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Andrew Gaffney
Paul Kraus wrote: Ok I am in a crunch situation. I have to gather a report from a credit card system. The system is archaic and runs on windows. On this software I have to go in for each day since January and print a report ( you can not do this as a batch :( gr some programmer should be shot,

Re: How to work with 64 Bit unsinged Intergers or "Network" formatted numbers.

2003-11-20 Thread david
Bastian Angerstein wrote: > Hello, > > I am working with SNMP and 64 Bit unsigned Intergers. > [snip] > The thing that I do is > $var = unpack("N*", $any64bitvalue); > or > $var = unpack("I*", $any64bitvalue); > to make sure the number is an unsigned Interger. why are you doing the above? 'N*'

How does perl compile functions

2003-11-20 Thread Dan Anderson
I'm curious how perl "compiles" functions internally. When the actual C code (or ASM equivalent or bytecode or whatever Perl uses) for a function is run, is there overhead to the function? Are functions inlined? Does perl lazy compile functions? (i.e. functions never used are never compiled and

RE: Strange characters

2003-11-20 Thread david
Chetak Sasalu wrote: > > Hi, > > I tried "export LANG=en_US" . But the esc characters remain. Cygwin is a > linux simulator on windoze. Anybody who has worked on cygwin and faced > similar problems? Should I try other lang settings? > what do you get when you do: env | grep LANG i have neve

RE: Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Bakken, Luke
> Ok I am in a crunch situation. I have to gather a report from > a credit card system. The system is archaic and runs on > windows. On this software I have to go in for each day since > January and print a report ( you can not do this as a batch > :( gr some programmer should be shot, twic

Re: Rephrasing the Question

2003-11-20 Thread R. Joseph Newton
Jason Dusek wrote: Hi Jason, I'm redirecting this to the list, so that all can participate in the discussion. Folks have found that it works better that way. You get input from a much broader range of perspectives. > On Wednesday, November 19, 2003, at 02:00 AM, R. Joseph Newton wrote: > >

Help - In crunch Situation Print to file append Windows or Linux

2003-11-20 Thread Paul Kraus
Ok I am in a crunch situation. I have to gather a report from a credit card system. The system is archaic and runs on windows. On this software I have to go in for each day since January and print a report ( you can not do this as a batch :( gr some programmer should be shot, twice). I want to

Re: using Getopt with subroutines

2003-11-20 Thread drieux
On Wednesday, Nov 19, 2003, at 15:27 US/Pacific, Freimuth,Robert wrote: I have a subroutine that is contained within its own module and package. It currently takes 7 different arguments, but only 2 of them are required because I can set defaults for the other 5. let me see if I understand your i

Re: using Getopt with subroutines

2003-11-20 Thread Hacksaw
I don't think you'll quite be able to have it be as modular as you would like since it creates globals. I'd recommend looking at the package, since it is in plain text, make a copy and modify it to your needs. But since you have to deal with the variables it sets anyway, it seems like you coul

Re: export constants from package

2003-11-20 Thread drieux
On Wednesday, Nov 19, 2003, at 12:43 US/Pacific, Haim Ashkenazi wrote: [..] I was talking about the first example, but I think I've made a mistake... I tried to add the constant to to my @EXPORT (which was declared with "use constant ...") and I've got an error. I was probably too quick to assum

Re: How to work with 64 Bit unsinged Intergers or "Network" formatted numbers.

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 01:54 US/Pacific, Bastian Angerstein wrote: [..] This means that the value 36893488147419103231 becomes 8589934591. I do not have the possibility to use 64 BIT perl. I am using aix 4.3.3 and I cant tell you it is no fun building a perl there. well that seems to b

test

2003-11-20 Thread Deborah Dominey
Sorry about the posting. I haven't recieved any posts from this group today, so I'm testing. --Deborah -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: rendering html from perl

2003-11-20 Thread NYIMI Jose (BMB)
Have a look to : http://www.masonhq.com/ José. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 11:45 AM To: [EMAIL PROTECTED] Subject: RE: rendering html from perl On Friday, Nov 14, 2003, at 02:29 US/Pacific, [EMAIL PROTECTED] w

RE: rendering html from perl

2003-11-20 Thread john
X-Spam-Check-By: one.develooper.com X-Spam-Status: No, hits=5.2 required=7.0 tests=CARRIAGE_RETURNS,NO_MX_FOR_FROM,NO_REAL_NAME,QUOTED_EMAIL_TEXT,RELAYING_FRAME,SPAM_PHRASE_03_05 version=2.44 X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/ On Friday, Nov 14, 2003, at 02:29 US/Pacific,

Re: Perl optimization tools

2003-11-20 Thread Bob X
SciTE has the following command, so it must have a Lint somewhere as a module. perl -MO=Lint,all -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

using Getopt with subroutines

2003-11-20 Thread Freimuth,Robert
Hello, I have a subroutine that is contained within its own module and package. It currently takes 7 different arguments, but only 2 of them are required because I can set defaults for the other 5. Since I anticipate using this module in multiple programs, I'd like to keep the parameter list as

Re: export constants from package

2003-11-20 Thread Haim Ashkenazi
Drieux wrote: > > On Wednesday, Nov 19, 2003, at 06:38 US/Pacific, Haim Ashkenazi wrote: > >> Hi >> >> I'm writing a module to serve a script I'm writing and I was wondering >> if >> it's possible to add a constant to the @EXPORT array. I prefer not to >> use >> variables because these settings

How to work with 64 Bit unsinged Intergers or "Network" formatted numbers.

2003-11-20 Thread Bastian Angerstein
Hello, I am working with SNMP and 64 Bit unsigned Intergers. To give you a view on the different possible values and types I come across: 2147483648 = 1000 = 8000 = 2^31 4294967296 = 1 = 1 = 2^32 4294967295 = 1

Re: Can a regex match numbers?

2003-11-20 Thread Jabez Wilson
Thanks for all the responses. I have looked at Jeffrey Friedl's book and it explains it very well, except I now do not understand why ip=123.3.21.223 is not allowed. Or am I misunderstanding something trivial? > > > > Hello, please can you help me. Is it possible to specify number matching

RE: Strange characters

2003-11-20 Thread chetak.sasalu
Hi, I tried "export LANG=en_US" . But the esc characters remain. Cygwin is a linux simulator on windoze. Anybody who has worked on cygwin and faced similar problems? Should I try other lang settings? Thanks, Chetak. -Original Message- From: david [mailto:[EMAIL PROTECTED] Sent: Thursd