Re: Computing elapsed time in this format hh:mm:ss.

2005-05-11 Thread Eva Perales Laguna
On Tue, May 10, 2005 at 12:54:26AM -0700, Harold Castro wrote: > I need to compute the total elapsed time with this > format: > > start end Total > > 06:30:17 09:00:14 2.50 hours > > > Do you know any shortcut to this instead of splitting > each number in between colons? Yo

grouping mechanism

2005-05-11 Thread Mark Martin
HI, I want to provide remittance slips to my suppliers. I've extracted data from my payments database and pushed records into an array. Here is a sample of data from that array : 01,supplierA,100.00,1st May 2005 02,supplierB,100.00,3rd May 2005 03,supplierC,100.00,3rd May 2005 04,supplierA,100.0

Re: grouping mechanism

2005-05-11 Thread John Doe
Am Mittwoch, 11. Mai 2005 15.18 schrieb Mark Martin: > HI, > I want to provide remittance slips to my suppliers. I've extracted data > from my payments database and pushed records into an array. Here is a > sample of data from that array : > > 01,supplierA,100.00,1st May 2005 > 02,supplierB,100.00,

Re: grouping mechanism

2005-05-11 Thread Lawrence Statton
> HI, > I want to provide remittance slips to my suppliers. I've extracted data > from my payments database and pushed records into an array. Here is a > sample of data from that array : > > 01,supplierA,100.00,1st May 2005 > 02,supplierB,100.00,3rd May 2005 > 03,supplierC,100.00,3rd May 2005 >

substituting variables in external file.

2005-05-11 Thread christopher . l . hood
I have a need to have 3 different templates of email text outside of my actual script, what I want to know is can I use variables in the templates then open the file for reading and substitute the variables in the text with some data saved in matching variables in my script? Is there a module that

RE: substituting variables in external file.

2005-05-11 Thread Moon, John
Subject: substituting variables in external file. I have a need to have 3 different templates of email text outside of my actual script, what I want to know is can I use variables in the templates then open the file for reading and substitute the variables in the text with some data saved in match

~.pm may be a broken handle

2005-05-11 Thread Mary Burwell
Hello, I get the error below when trying to update CPAN using perl -MCPAN -e 'install Bundle::CPAN' The bundle file ~cpan\Bundle\CPAN.pm may be a broken handlefile. It seems not to contain any bundle definition. Please check The file and if it is bogus, please delete it..

Re: ~.pm may be a broken handle

2005-05-11 Thread Chris Devers
On Wed, 11 May 2005, Mary Burwell wrote: > I get the error below when trying to update CPAN using perl -MCPAN -e > 'install Bundle::CPAN' > > The bundle file ~cpan\Bundle\CPAN.pm may be a broken > handlefile. It seems not to contain any bundle definition. Please > check The file and i

cannot match string

2005-05-11 Thread Jonathan Soons
I am trying to lock out a batch of users. They are all in file "cleanup.txt". All the users exist in "/etc/shadow". I have made a backup of "/etc/shadow" to play with. I cannot figure out why I cannot match users from the file with usernames in field 0 of "/etc/shadow.bak". I am writing to "new

RE: cannot match string

2005-05-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jonathan Soons wrote: > I am trying to lock out a batch of users. They are all in file > "cleanup.txt". > All the users exist in "/etc/shadow". I have made a backup of > "/etc/shadow" to play with. I cannot figure out why I cannot match > users from the file with usernames in field 0 > of "/etc/s

rename files

2005-05-11 Thread perlocean
Hi, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? opendir(DIR, "/tmp") or die "can not open dir: $!\n"; my @files = grep {/.jpg/ } readdir(DIR); closedir(DIR); my $count = 1; foreach (@files){ print "@files\n"; # wo

Re: rename files

2005-05-11 Thread Octavian Rasnita
Hi, The line: $new =~ s/(.*)(.jpg)/$count$2/; is bad. (.*) matches every single character until the end of the file name. (And btw, .jpg means "any character" followed by jpg). Teddy - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 10:08 PM Sub

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? More on above, All the files are already na

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:23 PM Subject: Re: rename files - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all the files in a directory

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:23 PM Subject: Re: rename files - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all the files in a directory

Re: rename files

2005-05-11 Thread bright true
The following would rename any file in a directory (.anything) into numbers in the same extention i hope it will be usfull opendir(DIR,"$dir") or print "$!"; my @content = sort(readdir(DIR)); closedir(DIR); my $no=0; *foreach my* $number (@content){ $no++; $number =~m/\S+\.(\S+)/; rename("$dir/

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: "bright true" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Wednesday, May 11, 2005 2:55 PM Subject: Re: rename files The following would rename any file in a directory (.anything) into numbers in the same extention i hope it will be usfull opendir(DIR

Re: cannot match string

2005-05-11 Thread Jeff Eggen
>>> "Jonathan Soons" <[EMAIL PROTECTED]> 11/05/2005 12:45:23 pm >>> >I am trying to lock out a batch of users. They are all in file "cleanup.txt". >All the users exist in "/etc/shadow". I have made a backup of "/etc/shadow" to play with. >I cannot figure out why I cannot match users from the file

calling a separate perl script from within another perl script

2005-05-11 Thread DBSMITH
All, I have done some reading and know there are various way to do this, but want to if there is an ideal way to call a non local perl script. I know it probably matters what one is doing, but in my case all I want to do is print the data from one script to the FH of another. The ways I know about

Re: looping over a tied hash problem

2005-05-11 Thread Dave Gray
> Dave, I've got some more code here that should explain exactly what I'm > trying to do, what do you think of the structure? As you can probably tell > I'm having problems accessing the keys and values from a tied hash, any > ideas how I can get the keys and the values printed to the screen? > >

Re: rename files

2005-05-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi, Hello, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? opendir(DIR, "/tmp") or die "can not open dir: $!\n"; my @files = grep {/.jpg/ } readdir(DIR); closedir(DIR); my $count = 1; foreach (

Re: rename files

2005-05-11 Thread Jay Savage
On 5/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: "bright true" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: > Sent: Wednesday, May 11, 2005 2:55 PM > Subject: Re: rename files > > >The following would rename any file in a directory (.anythi