Re: reading Perl syntax

2006-06-09 Thread Dr.Ruud
Peter Scott schreef: > Tom Phoenix: >> In Perl, merely referencing a key >> in a hash doesn't change the hash. Some non-Perl hash implementations >> do change the hash in those circumstances, though, so your confusion >> is understandable. > > Not to detract from your point in this thread, but jus

Re: Create array of references

2006-06-09 Thread John W. Krahn
beginner wrote: > Hi, Hello, > I am trying to create an array of references but am getting stuck at > how/when to push the reference into the array > > Below is some sample data and a snip of what I have been trying. What > is happening is that the reference $times is getting pushed into the

Re: Create array of references

2006-06-09 Thread Peter Cornelius
The problem you're having is that you're creating a new hash reference in each of your if/elsif statements. I'm going to make some assumptions about your data since I don't know anything about it, but it looks like you want to group back/home/out times by day. If that's what you want then

Re: Create array of references

2006-06-09 Thread Muma W.
beginner wrote: Hi, I am trying to create an array of references but am getting stuck at how/when to push the reference into the array [...] } elsif ($key =~ /j/ ) { $times = { out => $time}; Try this: $times->{out} = $time; [...] -- To unsubscribe, e-

[OT]Re: Re: defaults @ 1149875970

2006-06-09 Thread Johan Meskens CS3 jmcs3
Intrah onat Diria .. 09 Jun 2006 08:10:11 -0700 , Randal L. Schwartz wrote "Revera y": > x-mayan-date: Long count = 12.19.13.6.13; tzolkin = 9 Ben; haab = 6 Zotz .. the following could be unreadable @ 1149876152 ::: _ , / , > , 982 , "tome" , > , i

Create array of references

2006-06-09 Thread beginner
Hi, I am trying to create an array of references but am getting stuck at how/when to push the reference into the array Below is some sample data and a snip of what I have been trying. What is happening is that the reference $times is getting pushed into the array before all the keys are define

Re: defaults

2006-06-09 Thread Randal L. Schwartz
> ""Dr" == "Dr Ruud" writes: "Dr> And q{0 but true} and q{0e0} and q{0e1} etc. become 1 as well. Exactly what I wanted, yes. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing,

Re: defaults

2006-06-09 Thread Randal L. Schwartz
> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: "Mr> How about? "Mr> $variable = 1 - !$variable; Same problem. And you'll also get a warnings error. There is *no promise* in the Perl docs that a boolean returns a specific value for "true" or "false". Any code that depends on s

Re: defaults

2006-06-09 Thread Dr.Ruud
(Randal L. Schwartz) schreef: > There's an &&=, and I thought I'd never use it. > > However, one day, I realized that I needed to "normalize" the > "true/false" value of a variable, because I wanted to reduce all > possible true/false values to just 1/0 for easy operations in the > next step of th

Re: reading Perl syntax

2006-06-09 Thread Peter Scott
On Wed, 07 Jun 2006 09:00:12 -0400, Tom Phoenix wrote: > In Perl, merely referencing a key > in a hash doesn't change the hash. Some non-Perl hash implementations > do change the hash in those circumstances, though, so your confusion > is understandable. Not to detract from your point in this thre

Re: defaults

2006-06-09 Thread Mr. Shawn H. Corey
On Fri, 2006-09-06 at 09:54 -0400, Mr. Shawn H. Corey wrote: > How about? > > $variable = 1 - !$variable; And, of course, to calculate its inverse: $variable = 1 - !!$variable; -- __END__ Just my 0.0002 million dollars worth, --- Shawn "For the things we have to learn before we c

Re: defaults

2006-06-09 Thread Mr. Shawn H. Corey
On Fri, 2006-09-06 at 06:10 -0700, Randal L. Schwartz wrote: > > ""John" == "John W Krahn" <[EMAIL PROTECTED]> writes: > > "John> Wouldn't > > "John> $variable = !!$variable; > > "John> work just as well? > > No. There's no promise that the output of ! is "0" and "1". In fact, >

Re: defaults

2006-06-09 Thread Randal L. Schwartz
> ""John" == "John W Krahn" <[EMAIL PROTECTED]> writes: "John> Wouldn't "John> $variable = !!$variable; "John> work just as well? No. There's no promise that the output of ! is "0" and "1". In fact, it's "" and "1". And that's exactly what I was trying to avoid. Don't confuse C

RE: FW: Exec a script on one server that will exec other scripts on a different server..

2006-06-09 Thread William Paulsen \(W\)
I Yes, I'd like to have a program that keeps a connection open such that the client can tell the server to exec one of the three programs. This should be without consideration of a password or loginid. I've used NET::Telnet but because of the password changes the applications fail. From what I ca