Re: Syntax check

2002-05-29 Thread Felix Geerinckx
on Thu, 30 May 2002 04:20:43 GMT, [EMAIL PROTECTED] (Eric Beaudoin) wrote: > You might want to change [@user] to \@user if you really want to > refence that array instead of referencing a new copy of the array. > I'm not 100% sure but I don't think [@user] is the same as \@user. You're right,

Re: iterating over the contents of a directory

2002-05-29 Thread Sudarsan Raghavan
"Shishir K. Singh" wrote: > don't think there is a way to get the full path. The only way I can think of is by >concatening the results of the readdir with the $path that you used for opening the >directory. perldoc -f glob print while (<$your_src_dir/*>); This will print all the files with $y

a win command console exe how perl launch & capture its STDOUT?

2002-05-29 Thread Alan C.
Hi, I've a Win 2K command console executable. Once this .exe is launched, its output goes to STDOUT. And, this output consists of text and html, in size, just about the amount for a small to medium web page. Also want to strip and discard the html from the output so as to capture only the t

UNIX Domain Socket help required.

2002-05-29 Thread John Hennessy
Hi, I am looking for a good IO::Handle example for a simple client and server. I have checked the perlipc document but must still be missing something. It echoes data back to client ok but I simply need to have the server listening for client connections and print the data to another filehandle

Re: Syntax check

2002-05-29 Thread John W. Krahn
Melissa Cama wrote: > > Hi all, Hello, > Just a quick question! > > Is this the right way to assign an array to a key, in a Hash?? You can't assign an array reference to a hash key only to a hash value. > %hash_FeatureUsers = ($str_feature => [@user]); That will work. :-) John -- use Pe

regexEvaluater1.0.2.pl

2002-05-29 Thread Mok T.Y.-r15382
While using your regexEvaluater1.0.2.pl, I encounter the following problem: "Can't locate Tk.pm in @INC ( @INC contains: C:/Perl/lib C:/perl/site/lib. ) at regexe~1.pl line 54. BEGIN failed--compilation aborted at regexe~1.pl line 54." I am a newbie using ActivePerl 5.6.1.630. No experience cod

Re: Syntax check

2002-05-29 Thread Eric Beaudoin
At 22:28 2002.05.29, [EMAIL PROTECTED] wrote: >Hi all, > >Just a quick question! > >Is this the right way to assign an array to a key, in a Hash?? > >%hash_FeatureUsers = ($str_feature => [@user]); > >Thanks >Melissa If you want to create an hash (or replace an existing one) with one entry, the k

Here is a web site that might interest someone.

2002-05-29 Thread designer
Hi All: Found this web site and downloaded the app Perl Studio. Dynomite...check it out... http://www.perl-studio.com/ Regards designer95

Syntax check

2002-05-29 Thread Melissa.Cama
Hi all, Just a quick question! Is this the right way to assign an array to a key, in a Hash?? %hash_FeatureUsers = ($str_feature => [@user]); Thanks Melissa -- This message and any attachment is confidential and may b

Re: Autodetect line endings in a text file...

2002-05-29 Thread Todd Wade
"Sumit Babu" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello All, > > I will be getting the files from different platforms (i.e. Unix or > Windows). Is there a way i can automatically detect the line endings and > accordingly use the chomp function t

RE: union of times algorithm

2002-05-29 Thread Beau E. Cox
Hi Bryan, it's me again, I had a bug - the if statement when stuffing the %ranges hash was wrong. Here is the corrected code: use strict; use warnings; my @starts = (3, 4, 15, 16); my @stops = (5, 10, 20, 19); my %ranges; PAIR: for (my $i = 0; $i <= $#starts; ++$i) { for (keys %ranges

RE: union of times algorithm

2002-05-29 Thread Beau E. Cox
Hi Bryan - Well, it ain't pretty, but this seems to work: use strict; use warnings; my @starts = (3, 4, 15); my @stops = (5, 10, 20); my %ranges; PAIR: for (my $i = 0; $i <= $#starts; ++$i) { for (keys %ranges) { if ($starts[$i] > $_ and $starts[$i] < $ranges{$

GD::Text, GD::Graph -> Truetype font problems.

2002-05-29 Thread vanHardenbergP
Instead of a useful font, I get the "symbol not found" boxes. The number of boxes is equal to the string length. This leads me to believe that it is having trouble loading the font. I have looked on the net and been unable to find a sol'n. Other: I would like to put two $graph objects onto the b

union of times algorithm

2002-05-29 Thread Bryan R Harris
I'm trying to come up with an algorithm that seems like it ought to be really easy, but it's turning out to be pretty tough... Basically I have three pairs of start/stop times, e.g.: 3, 5 4, 10 15, 20 I want the total time covered by all these ranges. I can't just say (5-3 + 10-4 + 20

RE: Problem reading a file and passing a variable

2002-05-29 Thread Lance Prais
This is the most bizarre thing I have ever seen. I am using the following code: There is absolutely no reason why this should not return anything when I pass in the variable. The text file that it is reading form looks like this: 1-10903223 1-281734170 1-294613112 1-313763161 1-314022306 1-33089

Re: elements 2 thru end of the results of a split

2002-05-29 Thread Bryan R Harris
Thanks, John. __ Bryan R Harris wrote: > > > @myarray = split ' ', $fContent[$i]; > > Is this special form of split documented somewhere? Does it still split on > all whitespace? perldoc -f split [snip] As a special case, specifying a PATTERN of space (`' '') will

RE: install crypt::passgen

2002-05-29 Thread Beau E. Cox
Hi - Are you, by chance, running Windows? If you use the ppm3 command: ppm> describe crypt-passgen you will note that this module is available for Solaris and Linux only. Aloha => Beau. -Original Message- From: Postman Pat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002

Re: variable initialization

2002-05-29 Thread John W. Krahn
Jason Frisvold wrote: > > I stumbled across a bug in my own code I figured I'd share... Actually, > I'm wondering if there is a way to do this > > I was using the following code : > > my ($var1, $var2) = 0; > > The intent was to initialize the variables to 0. However, as I found > out a

Re: elements 2 thru end of the results of a split

2002-05-29 Thread John W. Krahn
Bryan R Harris wrote: > > > @myarray = split ' ', $fContent[$i]; > > Is this special form of split documented somewhere? Does it still split on > all whitespace? perldoc -f split [snip] As a special case, specifying a PATTERN of space (`' '') will split on white space just as `split

RE: Problem reading a file and passing a variable

2002-05-29 Thread Chas Owens
On Wed, 2002-05-29 at 18:35, Lance Prais wrote: > Thank you.I scaled down the SQL and tested it in SQL (records returned) > and then in the script(no records returned). This is bizarre to me. > Actually it it is a string with the values being for example "1-9" Do yo mean $ln contains the

RE: Problem reading a file and passing a variable

2002-05-29 Thread Lance Prais
Thank you.I scaled down the SQL and tested it in SQL (records returned) and then in the script(no records returned). This is bizarre to me. Actually it it is a string with the values being for example "1-9" Does perl default to a string? If I put "" or '' around the? Like so '?' Or "?"

Re: variable initialization

2002-05-29 Thread Jeff 'japhy' Pinyan
On May 29, Jason Frisvold said: >my ($var1, $var2) = 0; > >The intent was to initialize the variables to 0. However, as I found >out a few minutes ago, this only initializes the first variable in the >list to 0 and leaves the others as undefined... > >Is there an easy way to do this? I know I c

variable initialization

2002-05-29 Thread Jason Frisvold
I stumbled across a bug in my own code I figured I'd share... Actually, I'm wondering if there is a way to do this I was using the following code : my ($var1, $var2) = 0; The intent was to initialize the variables to 0. However, as I found out a few minutes ago, this only initializes the

Re: elements 2 thru end of the results of a split

2002-05-29 Thread Bryan R Harris
> @myarray = split ' ', $fContent[$i]; Is this special form of split documented somewhere? Does it still split on all whitespace? My problem is that the string I'm splitting may or may not have leading whitespace... TIA. - B __ Bryan R Harris wrote: > > Is it possible to

Re: converting a hash to an array

2002-05-29 Thread Janek Schleicher
Felix Geerinckx wrote at Wed, 29 May 2002 17:17:38 +0200: > on Wed, 29 May 2002 16:10:40 GMT, [EMAIL PROTECTED] (Janek Schleicher) wrote: > >> Oops, there's a typo :-(( >> >> Of course, I meant >> @sorted = reverse sort { $myhash{$a} <=> $myhash{b} } keys %myhash; > > There's another typo. Ye

RE: Problem reading a file and passing a variable

2002-05-29 Thread Chas Owens
On Wed, 2002-05-29 at 17:05, Lance Prais wrote: > [Chas], > Thank you, you made me realize the value of indention like never before. > In the past I used the "=?" to return results form the query but in this > case when I used in and run this script it does not error out but instead > the query

Re: what does a diff return?

2002-05-29 Thread Janek Schleicher
Jose Torres wrote at Wed, 29 May 2002 20:30:06 +0200: > Hi, > > If I'm calling the diff program from within a Perl script with something like: > > system("diff file1.txt file2.txt"); > > how can I detect if there is a result or not, since if the files are identical, diff >doesn't have > any o

Re: Problem reading a file and passing a variable

2002-05-29 Thread Chas Owens
On Wed, 2002-05-29 at 16:13, Lance Prais wrote: > I am m using the following code to read from a .txt file. I am running into > a problem that I am not sure why it is happening. > The problem is when I run this script the SQL is not reading the variable. > I am testing to make sure the .txt file

Re: Help handling text files.

2002-05-29 Thread Janek Schleicher
Josh wrote at Wed, 29 May 2002 23:56:48 +0200: > Ok Heres the deal :) I have a script to write to a dat file and the basic output in >the dat file > is > > username:plan: so an example would be > computer:50: meaning the username computer has 50 hours of paid dialup access. > > Now Lets say "c

Re: Problem reading a file and passing a variable

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 20:13:13 GMT, Lance Prais wrote: There is no need to post your message three times in less than 10 minutes. > while( my $ln = ) > { > chomp($ln); > #use the items of the > my $get_case_text = $dbh->prepare("SELECT a.sr_num ,b.name ,b.loc > ,a.sr_title,f.mid_name ,

Problem reading a file and passing a variable

2002-05-29 Thread Lance Prais
I am m using the following code to read from a .txt file. I am running into a problem that I am not sure why it is happening. The problem is when I run this script the SQL is not reading the variable. I am testing to make sure the .txt file contains data and it does. I get the following error: D

Problem reading a file and passing a variable

2002-05-29 Thread Lance Prais
I am m using the following code to read from a .txt file. I am running into a problem that I am not sure why it is happening. The problem is when I run this script the SQL is not reading the variable. I am testing to make sure the .txt file contains data and it does. I get the following error: D

Problem reading a file and passing a variable

2002-05-29 Thread Lance Prais
I am m using the following code to read from a .txt file. I am running into a problem that I am not sure why it is happening. The problem is when I run this script the SQL is not reading the variable. I am testing to make sure the .txt file contains data and it does. I get the following error: D

Re: hole: a memory leak

2002-05-29 Thread Chas Owens
On Wed, 2002-05-29 at 15:26, drieux wrote: > > On Wednesday, May 29, 2002, at 09:06 , Jackson, Harry wrote: > > >> -Original Message- > >> From: F.Xavier Noria [mailto:[EMAIL PROTECTED]] > >> > >> What would be the shortest code that leak? > > > > Its not really the length as much as the

Re: hole: a memory leak

2002-05-29 Thread Jonathan E. Paton
> >> -Original Message- > >> From: F.Xavier Noria [mailto:[EMAIL PROTECTED]] > >> > >> What would be the shortest code that leak? > > > > Its not really the length as much as the width > > of the whole that causes a leak. This challange is now being covered on the golf mailing list. I ca

Re: hole: a memory leak

2002-05-29 Thread drieux
On Wednesday, May 29, 2002, at 09:06 , Jackson, Harry wrote: >> -Original Message- >> From: F.Xavier Noria [mailto:[EMAIL PROTECTED]] >> >> What would be the shortest code that leak? > > Its not really the length as much as the width of the whole that causes a > leak. well you could wr

Thanks/solved - Re: Links to randomly-accessed html pages

2002-05-29 Thread Rohesia Hamilton Metcalfe
Dear Adam, Thanks!!! That worked. (And my stuck brain can work again...) Best, Rohesia --- Adam Morton <[EMAIL PROTECTED]> wrote: > A better approach would be to have a static 'left' frame that links > to a CGI > that redirects to a random page. > > Like so: > Target="main">This Link > >

Help handling text files.

2002-05-29 Thread Josh
Ok Heres the deal :) I have a script to write to a dat file and the basic output in the dat file is username:plan: so an example would be computer:50: meaning the username computer has 50 hours of paid dialup access. Now Lets say "computer" calls and wishes to upgrade his account to 100 hours

RE: Modules

2002-05-29 Thread Shishir K. Singh
Thanks!! -Original Message- From: Elaine -HFB- Ashton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:48 PM To: Shishir K. Singh Cc: [EMAIL PROTECTED] Subject: Re: Modules Shishir K. Singh [[EMAIL PROTECTED]] quoth: *>Wanted to know the modules that are already present in t

Re: Reading RGB Values of Pixels in Images

2002-05-29 Thread Adam Morton
You want to "read the RGB pixel values from them and write these to a file"? As was already pointed out, that is already what is in the file for some graphics formats! What is it you are actually trying to accomplish here? Maybe you just want to use imagemagick on the command line to convert your

Re: Modules

2002-05-29 Thread Elaine -HFB- Ashton
Shishir K. Singh [[EMAIL PROTECTED]] quoth: *>Wanted to know the modules that are already present in the standard stable.tar.gz distribution. I had a Active Perl distribution. Now I need to install the stable.tar.gz and wanted to know the additional modules that I may have to install. http://w

Re: Links to randomly-accessed html pages

2002-05-29 Thread Adam Morton
A better approach would be to have a static 'left' frame that links to a CGI that redirects to a random page. Like so: This Link And then "RandomPage.cgi" just has to pic a random page, and return a redirect header to that page. - Original Message - From: "Rohesia Hamilton Metcalfe" <[E

Re: what does a diff return?

2002-05-29 Thread Dave K
Jose, try: $ perl -e ' my $delta; $delta = `diff ae.txt ae.txt`; print $delta."\n"; unless ($delta) { print"they are identical\n"; }' HTH "Jose Torres" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > If I'm calling the diff program from within a Perl

RE: what does a diff return?

2002-05-29 Thread Bob Showalter
> -Original Message- > From: Torres, Jose [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 11:30 AM > To: [EMAIL PROTECTED] > Subject: what does a diff return? > > > Hi, > > If I'm calling the diff program from within a Perl script > with something > like: > > system("diff f

Modules

2002-05-29 Thread Shishir K. Singh
Wanted to know the modules that are already present in the standard stable.tar.gz distribution. I had a Active Perl distribution. Now I need to install the stable.tar.gz and wanted to know the additional modules that I may have to install. Thanks Shishir -- To unsubscribe, e-mail: [EMAIL PROT

what does a diff return?

2002-05-29 Thread Torres, Jose
Hi, If I'm calling the diff program from within a Perl script with something like: system("diff file1.txt file2.txt"); how can I detect if there is a result or not, since if the files are identical, diff doesn't have any output? I need to be able to be able to determine if there was any output

use Getopt::Std was Re: Getting data from console

2002-05-29 Thread drieux
On Wednesday, May 29, 2002, at 09:27 , drieux wrote: [..] > perldoc Getopt::Standard before the monkeyBoys[tm] start screeching and flapping their wings - that should have been perldoc Getopt::Std I keep forgetting when we spend the $100 and buy the vowel from vanna. So that peo

Links to randomly-accessed html pages

2002-05-29 Thread Rohesia Hamilton Metcalfe
Hello, I am working on a web project that will be using the srand function both in the creation of html pages (some of the elements get randomly selected from lists) and in the selection of pages to be called when the user clicks certain links. So far, I can get what I need when I'm compiling a

Re: DB

2002-05-29 Thread Chas Owens
On Wed, 2002-05-29 at 11:42, Milen Hristov wrote: > How can i create binary db. Depends on what you mean by a DB, take a look at dbmopen (perldoc -f dbmopen). > How can i push "1234" in binary file that perl can read ? take a look at pack and unpack (perldoc -f pack, perl -f unpack). > >

Re: Reading RGB Values of Pixels in Images

2002-05-29 Thread Geoffrey F. Green
ImageMagick, perhaps? Or maybe Image::Info will do what you want (available from your local CPAN mirror). On 5/29/02 11:58 AM, "Chris Egan" <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm very new to Perl and have a question that I haven't been able to > find an answ

Re: converting a hash to an array

2002-05-29 Thread Peter Lemus
Please remove me from email list. thanks. --- Felix Geerinckx <[EMAIL PROTECTED]> wrote: > on Wed, 29 May 2002 12:58:33 GMT, > [EMAIL PROTECTED] (Craig > Hammer) wrote: > > > I thought this would work: > > Your code is very buggy: > > > > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys

Reading RGB Values of Pixels in Images

2002-05-29 Thread Bryan R Harris
I am by no means an expert, but you've got a big task on your hands. BMP files will probably be the easiest, since they are stored - red, green, blue, red, green, blue, , but there is header information you have to get past, and you also have to figure out how long the rows are. PNG and JPG

Re: Getting data from console

2002-05-29 Thread drieux
On Wednesday, May 29, 2002, at 08:31 , Tor Hildrum wrote: [..] >> Just another question. How can I get a user input from the console in >> perl? >> I'm just playing with the DBI Module and want to ask for a select >> statement, >> which I can enter in the console. Executing the statment works a

RE: hole: a memory leak

2002-05-29 Thread Jackson, Harry
> -Original Message- > From: F.Xavier Noria [mailto:[EMAIL PROTECTED]] > > > What would be the shortest code that leak? Its not really the length as much as the width of the whole that causes a leak. h **

RE: Shredding a file

2002-05-29 Thread Anders Holm
More than I wanted to know, thank you.. *LOL* k, let's get this OT off of here then with those lovely words from Nikola.. ;) Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Te

Reading RGB Values of Pixels in Images

2002-05-29 Thread Chris Egan
Hi, I'm very new to Perl and have a question that I haven't been able to find an answer to. I want to be able to read an image file (BMP, PNG, JPEG, etc...) or a series if image files and read the RGB pixel values from them and write these to a file. I have looked at various image libraries for

RE: Shredding a file

2002-05-29 Thread Nikola Janceski
Brain Bugs are next. Then the NSA will be selling off the porn movies that I dream up. > -Original Message- > From: zentara [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 12:36 PM > To: [EMAIL PROTECTED] > Subject: Re: Shredding a file > > > On Tue, 28 May 2002 20:15:58 +010

Re: Shredding a file

2002-05-29 Thread zentara
On Tue, 28 May 2002 20:15:58 +0100 (BST), [EMAIL PROTECTED] (Jonathan e. paton) wrote: >For those that feel comfortable, it is worth pointing out >"CRT Eavesdropping: Optical Tempest" on slashdot. > >http://slashdot.org/article.pl?sid=02/03/09/199242 > >Can a knowledgable person design a optical

DB

2002-05-29 Thread Milen Hristov
How can i create binary db. How can i push "1234" in binary file that perl can read ? - This mail is from: <[EMAIL PROTECTED]> - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

RE: iterating over the contents of a directory

2002-05-29 Thread Bob Rasey
What about $File::Find::name in File::Find? Bob Rasey On Wed, 2002-05-29 at 10:44, Shishir K. Singh wrote: > don't think there is a way to get the full [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: converting a hash to an array

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 16:10:40 GMT, [EMAIL PROTECTED] (Janek Schleicher) wrote: > Oops, there's a typo :-(( > > Of course, I meant > @sorted = reverse sort { $myhash{$a} <=> $myhash{b} } keys %myhash; There's another typo. And I'd rather add # sort keys in descending numerical order th

Re: converting a hash to an array

2002-05-29 Thread Janek Schleicher
Janek Schleicher wrote at Wed, 29 May 2002 17:20:02 +0200: > Make it more readable and write: > > @sorted = reverse sort { $myhash{$b} <=> $myhash{b} } keys %myhash; Oops, there's a typo :-(( Of course, I meant @sorted = reverse sort { $myhash{$a} <=> $my

RE: iterating over the contents of a directory

2002-05-29 Thread Janek Schleicher
Jose Torres wrote at Wed, 29 May 2002 16:41:23 +0200: > Thanks for your help everyone. I had a related question. It looks like readdir just >return > relative filenames and not absolute ones. Is there a way/method to return absolute >filenames? For > example, if I'm in /home/docs that has a tex

Re: converting a hash to an array

2002-05-29 Thread David T-G
Janek, et al -- ...and then Janek Schleicher said... % % Craig Hammer wrote at Wed, 29 May 2002 14:58:33 +0200: % ... % > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; ... % % You want to sort decreasingly, from the highest to the lowest. ... % Make it more readable and write: %

RE: scheduler question

2002-05-29 Thread Shishir K. Singh
Good one..Wonder how you stumbled across it. Typo error ?? :) -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:03 AM To: Perl Subject: RE: scheduler question It's amazing that wincron turned up more results than wincrap http://www.g

RE: scheduler question - newbie script

2002-05-29 Thread Stout, Joel R
Depending on how long the job takes, this little script runs about every 10 seconds. If you want to be more exact I think you'll have to fork. #!/usr/bin/perl -w use strict; use POSIX; # Start the loop for the daemon while(1) { my(@now) = localtime(); my($today) = POSIX::str

RE: scheduler question

2002-05-29 Thread Nikola Janceski
It's amazing that wincron turned up more results than wincrap http://www.google.com/search?hl=en&ie=UTF8&oe=UTF8&q=wincrap > -Original Message- > From: Mikhail Kyurshin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 11:58 AM > To: Perl > Cc: Lance Prais > Subject: Re: schedul

Re: scheduler question

2002-05-29 Thread Mikhail Kyurshin
use WinCron You can find it on http://google.com search for WinCron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: scheduler question

2002-05-29 Thread Jackson, Harry
> -Original Message- > From: Lance Prais [mailto:[EMAIL PROTECTED]] > > > I have written a Perl script that needs to be executed every > 10 seconds. > How would I go about doing this. I am working with Perl on > NT and using > scheduler and the lowest I can set it to is 1 minute. w

RE: scheduler question

2002-05-29 Thread Shishir K. Singh
How about using the sleep function in the script?? perldoc -f sleep -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:51 AM To: Perl Subject: scheduler question I have written a Perl script that needs to be executed every 10 seconds. How w

RE: scheduler question

2002-05-29 Thread Nikola Janceski
Perhaps write a perl script that is inifinitely looping and sleeps 10 secs then runs your other script. while (1){ sleep 10; system("myotherscript.pl"); } > -Original Message- > From: Lance Prais [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 10:51 AM > To: Perl > Subject: s

scheduler question

2002-05-29 Thread Lance Prais
I have written a Perl script that needs to be executed every 10 seconds. How would I go about doing this. I am working with Perl on NT and using scheduler and the lowest I can set it to is 1 minute. Thank you in advance Lance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

RE: iterating over the contents of a directory

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 14:41:23 GMT, [EMAIL PROTECTED] (Jose Torres) wrote: > Thanks for your help everyone. I had a related question. It looks > like readdir just return relative filenames and not absolute ones. > Is there a way/method to return absolute filenames? For example, > if I'm in /home/d

RE: iterating over the contents of a directory

2002-05-29 Thread Shishir K. Singh
don't think there is a way to get the full path. The only way I can think of is by concatening the results of the readdir with the $path that you used for opening the directory. -Original Message- From: Torres, Jose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:41 AM

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
Jose, Keep the list in the loop. Sometimes some of us get busy, (or goto lunch), and you won't get a response quickly. The code looks okay, so why not post what the error is so that we can tell you what is wrong. Also why not post how you are calling the subroutine. > -Original Mes

RE: iterating over the contents of a directory

2002-05-29 Thread Torres, Jose
Thanks for your help everyone. I had a related question. It looks like readdir just return relative filenames and not absolute ones. Is there a way/method to return absolute filenames? For example, if I'm in /home/docs that has a text file (foo.txt) and I call readdir, I want to return /home/docs/

Re: converting a hash to an array

2002-05-29 Thread Janek Schleicher
Craig Hammer wrote at Wed, 29 May 2002 14:58:33 +0200: > I've found a couple of examples of moving an array into a hash, but not of moving a >hash into an > array. > > I thought this would work: > > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; > I'd like to give another hint,

Help with linking libraries during install.

2002-05-29 Thread Jas Grewal
Hi All, I am tring to use a module in perl (MQSeries), there are however a few bugs with this module on my platform (hpux). A fix is to link the libraries during a perl installation. I know that I will have to recompile perl and edit the Makefile to do this. But I dont know what I have to edit in

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
Oh and I forgot glob() > -Original Message- > From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 10:27 AM > To: Nikola Janceski; Torres, Jose; [EMAIL PROTECTED] > Subject: RE: iterating over the contents of a directory > > > You might also check out perldo

RE: iterating over the contents of a directory

2002-05-29 Thread Shishir K. Singh
You might also check out perldoc DirHandle !! -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:27 AM To: 'Torres, Jose'; '[EMAIL PROTECTED]' Subject: RE: iterating over the contents of a directory check out opendir readdir and closedir

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
check out opendir readdir and closedir. > -Original Message- > From: Torres, Jose [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 10:23 AM > To: '[EMAIL PROTECTED]' > Subject: iterating over the contents of a directory > > > Hi, > > How can I simply iterate over the contents

iterating over the contents of a directory

2002-05-29 Thread Torres, Jose
Hi, How can I simply iterate over the contents of a directory? I want to perform a certain action when I locate a particular text file. Thanks. -Jose -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: calculate dates / regex

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 12:05:45 GMT, [EMAIL PROTECTED] (Sven Bentlage) wrote: > Encountered another problem: > [...] Why are you posting the exact same question as yesterday? Why didn't you take John's advice into account? Did you miss his reply? -- felix -- To unsubscribe, e-mail: [EMAIL PROT

[Thanks] AW: Getting data from console

2002-05-29 Thread Heiko Heggen
wow, so easy, great. thanks guys. heiko >>-Ursprüngliche Nachricht- >>Von: Tor Hildrum [mailto:[EMAIL PROTECTED]] >>Gesendet: Mittwoch, 29. Mai 2002 17:32 >>An: Heiko Heggen; Perl >>Betreff: Re: Getting data from console >> >> >>> From: "Heiko Heggen" <[EMAIL PROTECTED]> >>> Date: Wed,

Re: Getting data from console

2002-05-29 Thread Tor Hildrum
> From: "Heiko Heggen" <[EMAIL PROTECTED]> > Date: Wed, 29 May 2002 15:28:17 +0200 > To: "Beginners@Perl. Org" <[EMAIL PROTECTED]> > Subject: Getting data from console > > Hi. > > Just another question. How can I get a user input from the console in perl? > I'm just playing with the DBI Module a

Re: Getting data from console

2002-05-29 Thread Ìèõàèë Êþðøèí
> Hi. > Just another question. How can I get a user input from the console in perl? > I'm just playing with the DBI Module and want to ask for a select statement, > which I can enter in the console. Executing the statment works already fine > *gg*. > Thnx for your help. this is a great mailing l

RE: converting a hash to an array

2002-05-29 Thread Craig Hammer
Thank you Felix and Bob. I see I was approaching this compeltely wrong. Craig Hammer -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 8:23 AM To: [EMAIL PROTECTED] Subject: Re: converting a hash to an array on Wed, 29 May 2002 12:58:33

Getting data from console

2002-05-29 Thread Heiko Heggen
Hi. Just another question. How can I get a user input from the console in perl? I'm just playing with the DBI Module and want to ask for a select statement, which I can enter in the console. Executing the statment works already fine *gg*. Thnx for your help. this is a great mailing list :o) Hei

[Thanks] Re: Is there a good Perl way for a validation subroutine?

2002-05-29 Thread Leila Lappin
Thanks for the suggestions guys. - Original Message - From: "Leila Lappin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 11:55 PM Subject: Is there a good Perl way for a validation subroutine? > Hello all, > > I need to write a subroutine that validates severa

Re: converting a hash to an array

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 12:58:33 GMT, [EMAIL PROTECTED] (Craig Hammer) wrote: > I thought this would work: Your code is very buggy: > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; This should read: @sorted = sort { $myhash{$b} <=> $myhash{$a} } keys %myhash ;

RE: converting a hash to an array

2002-05-29 Thread Bob Showalter
> -Original Message- > From: Craig Hammer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 5:59 AM > To: Perl (E-mail) > Subject: converting a hash to an array > > > I've found a couple of examples of moving an array into a > hash, but not of > moving a hash into an array. >

RE: converting a hash to an array

2002-05-29 Thread Craig Hammer
ackk, I missed the $ in all of my re-arranging. The script still fails at the same place. The real error is: glob failed (child exited with status 1) at ./newlogscan.pl line 48. Craig Hammer Internal Infrastructure Team Lead Parago, Inc. 972-538-3936 -Original Message- From: Jackson,

RE: Formatting String output

2002-05-29 Thread Bob Showalter
> -Original Message- > From: Heiko Heggen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 5:48 AM > To: [EMAIL PROTECTED] > Subject: Formatting String output > > > Hi Guys. > > I want to format my String output with the 'printf' command, > but I cant find > the solution. For

RE: converting a hash to an array

2002-05-29 Thread Jackson, Harry
> -Original Message- > From: Craig Hammer [mailto:[EMAIL PROTECTED]] > > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; ^ * COLT Telecommu

converting a hash to an array

2002-05-29 Thread Craig Hammer
I've found a couple of examples of moving an array into a hash, but not of moving a hash into an array. I thought this would work: @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; while ( <@sorted> ) { printf ( "first field = %s second field = %s\n", $sorted{1}, $sorted{2} ) ;

Formatting String output

2002-05-29 Thread Heiko Heggen
Hi Guys. I want to format my String output with the 'printf' command, but I cant find the solution. For you experienced people this is not problem I think, so could you give me the right hint, please What I want to do: I have several arrays which contains a certain number of strings with differe

RE: calculate dates / regex

2002-05-29 Thread Sven Bentlage
Encountered another problem: I'm trying to use a calculated date value in a regex. It only works with values which are NOT calculated. my ($dc, $mc, $yc) = (localtime(time))[3,4,5]; my $date_now = sprintf("%02d-%02d-%02d", $dc, $mc+1, $yc-100);

Re: Is there a good Perl way for a validation subroutine?

2002-05-29 Thread Felix Geerinckx
on Wed, 29 May 2002 06:55:26 GMT, [EMAIL PROTECTED] (Leila Lappin) wrote: > I need to write a subroutine that validates several fields and > returns one summary field containing names of what failed. An ideal solution would depend on the context of the problem (like e.g. whether the fields ar

RE: e-mailing with DBI

2002-05-29 Thread Jackson, Harry
> -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED]] > > Although I don't know why you're worried about straining the > mysql server; I do not think that the mysql server would be in to much difficulty (depending on the amount of columns) rather the processing in the p

Re: Is there a good Perl way for a validation subroutine?

2002-05-29 Thread Janek Schleicher
Tagore Smith wrote at Wed, 29 May 2002 06:13:25 +0200: > ... > > in pseudocode: > > my @failed; > if (field fails validation){ >push @failed, $fieldname; > } > } > etc. > Or in another pseudocode: my @failed = grep {field fails validation} @fields; Cheerio, Janek -- To unsubscribe, e

  1   2   >