Re: reading log files in real time

2004-07-27 Thread Ramprasad A Padmanabhan
On Tue, 2004-07-27 at 19:50, Wiggins d Anconia wrote: > Please bottom post, this thread is unreadable. > > > > > Ramprasad, > > > > thanks for the heads up on File::Tail; > > > > unfortunatley the module isn't installed and we have a very tight > > restricttions on what we can install on produc

RE: Multiple Parameters

2004-07-27 Thread mafioso1823
Cool it works, thanks alot for your help. -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 9:04 PM To: [EMAIL PROTECTED] Cc: Perl Beginners Subject: Re: Multiple Parameters On Jul 26, 2004, at 6:29 PM, <[EMAIL PROTECTED]> wrote: > Tha

Net-SFTP issues

2004-07-27 Thread Michael Ragsdale
I'm trying to convert all of my scripts over from Net-FTP to Net-SFTP on Activestate 5.6.1. I was getting the error: Your vendor has not defined Fcntl macro F_SETFL, used at H:/Perl/site/lib/Net/SSH/Perl.pm line 218. After some research, I found that I need to install Net-SSH-W32Perl that is

RE: setting the environment variables in perl

2004-07-27 Thread perl.org
On Tue, 27 Jul 2004 11:58:51 -0400, Bob Showalter wrote > > It's really not a Perl issue per se. I assume you're talking about variables > used by Oracle libraries, like ORACLE_HOME and ORACLE_SID. > > I advise you to *not* attempt to set or monkey with these variables inside > the Perl script. T

RE: setting the environment variables in perl

2004-07-27 Thread u235sentinel
Good point in fact Oracle (for example) recommends setting the environment before you even install Oracle. To do it any other way invites trouble and as Oracle would say, you're on your own :-) > jason corbett wrote: > > How does one go about assuring that the environment variables are > > pro

RE: setting the environment variables in perl

2004-07-27 Thread Bob Showalter
jason corbett wrote: > How does one go about assuring that the environment variables are > properly set in perl? I read several books, but none go in depth > about how to write a script that includes all the required variables, > that way nothing gets left out. It's really not a Perl issue per se.

Re: setting the environment variables in perl

2004-07-27 Thread Flemming Greve Skovengaard
Paul Kraus wrote: You can access all the env variables like this... $ENV{ 'VAR' } example my $home = $ENV{ 'HOME' }; print "$home\n"; I have never tried to change them but I would assume that it would work. HTH, Paul Kraus On Tue, Jul 27, 2004 at 07:29:45AM -0700, jason corbett wrote: How does one

Re: setting the environment variables in perl

2004-07-27 Thread Paul Kraus
You can access all the env variables like this... $ENV{ 'VAR' } example my $home = $ENV{ 'HOME' }; print "$home\n"; I have never tried to change them but I would assume that it would work. HTH, Paul Kraus On Tue, Jul 27, 2004 at 07:29:45AM -0700, jason corbett wrote: > How does one go about as

RE: Serious question on using Perl or not...

2004-07-27 Thread u235sentinel
Personally I figured the original coder would join this list and respond (or at least respond). If he's really interested in Perl then more questions/answer would come. Silence get's his request dropped from my short term memory :-) > > Wiggins d Anconia wrote: > > > Gregorie Hostettler wrote

setting the environment variables in perl

2004-07-27 Thread jason corbett
How does one go about assuring that the environment variables are properly set in perl? I read several books, but none go in depth about how to write a script that includes all the required variables, that way nothing gets left out. Please advise. JC [snipet] #!/usr/bin/perl -w $ENV{"

Re: reading log files in real time

2004-07-27 Thread Wiggins d Anconia
Please bottom post, this thread is unreadable. > > Ramprasad, > > thanks for the heads up on File::Tail; > > unfortunatley the module isn't installed and we have a very tight > restricttions on what we can install on production servers (banks are like > that!!!). > Sillieness (I know), but st

RE: Serious question on using Perl or not...

2004-07-27 Thread Wiggins d Anconia
> Wiggins d Anconia wrote: > > Gregorie Hostettler wrote: > > > ... > > > As you can see when running this small piece of "code", as soon as > > > you push a new record, all records already existing become > > > filled with the new pushed record and it is impossible to get any > > > other... > > >

RE: Help with hash refs

2004-07-27 Thread Brian Ling
Thanks for the direction, For anyone who's interested, I found an excellent article that explains this behaviour here: http://tlc.perlarchive.com/articles/perl/ug0002.shtml Brian -Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 11:06 To: Brian L

Re: reading log files in real time

2004-07-27 Thread Adrian Farrell
Ramprasad, thanks for the heads up on File::Tail; unfortunatley the module isn't installed and we have a very tight restricttions on what we can install on production servers (banks are like that!!!). so I'm back needing to find a way to do it with the tell and seek commands, thanks, Ad

RE: [SOLUTION] how can i generate 10 unique (non repeating) numbers

2004-07-27 Thread Zeus Odin
my %ten; $ten{ rand() } = undef until scalar keys %ten == 10; print "$_\n" for keys %ten; Keep in mind, as Randy Sims pointed out, rand() is not truly random, but it is random enough for me. ;-) -Original Message- From: N, Guruguhan (GEAE, Foreign National, EACOE) [mailto:[EMAIL PROTECTE

RE: [SOLUTION] how can i generate 10 unique (non repeating) numbers

2004-07-27 Thread Zeus Odin
Randy, You are absolutely correct. Perl's rand function is not a random as it could be. List::Util (via Fisher-Yates) is definitely more "random." However, the original problem placed the contraint of not repeating any numbers. So with every number chosen, you invariably shrink the number of choic

RE: Serious question on using Perl or not...

2004-07-27 Thread Bob Showalter
Wiggins d Anconia wrote: > Gregorie Hostettler wrote: > > ... > > As you can see when running this small piece of "code", as soon as > > you push a new record, all records already existing become > > filled with the new pushed record and it is impossible to get any > > other... > > > > Looks like

Re: [SOLUTION] how can i generate 10 unique (non repeating) numbers

2004-07-27 Thread Randy W. Sims
Zeus Odin wrote: If you want to do it without the use of a module, you could (1) add the 15 numbers to an array (the deck) (2) choose a random number from the deck (3) remove that random element and add it to another array (your hand) (4) repeat until done (your hand has 10 numbers) This sounds exa

RE: Help with hash refs

2004-07-27 Thread Charles K. Clarkson
Brian Ling wrote: > my $test1 = ${refer}->{value}->{fred}; > print Dumper($refer); > # this doesn't change the data as i'd expect > > my $test2 = ${refer}->{value}->{fred}->{value}; > print Dumper($refer); > # this actually creates a key 'fred' pointing > # to a empty hash ref #I > > So my quest

RE: [SOLUTION] how can i generate 10 unique (non repeating) numbers

2004-07-27 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi Zeus, Your code and explanation are good. Incase I want 10 non repeated random numbers between 0 and 1 what needs to be done? Regards guruguhan -Original Message- From: Zeus Odin [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 5:17 AM To: [EMAIL PROTECTED] Subject

Help with hash refs

2004-07-27 Thread Brian Ling
Hi all, I seem to have completely confused myself with a data structure, as testing for a keys existence seems to create an anonymous hash ref. The following is a very cut down version of my code, to try and explore what's going on. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my