RE: rename and move multiple files

2005-10-24 Thread Timothy Johnson
The only change you might have to do for windows (and most of the Perl functions will let you slide on this) is that in Windows the delimiter for directories is the backslash. To search the entire hard drive, the OP might also want to look into File::Find. -Original Message

CPAN module for file upload/download

2005-10-24 Thread Dhanashri Bhate
Hello All! We have a website, which allows me to upload or download dictionary file. I am trying to write a perl program to automate the tests for this file upload/download functionality. Actually on CPAN I looked at the modules by name "HTTP", some looked useful ( URI::HTTP/HTTPS, LWP::Prot

RE: delete file after on week

2005-10-24 Thread José Pedro Silva Pinto
Hi, ZHAO, If your system is Unix or similar, you can use cron (See cron). If Windows, you can use task manager José Pinto -Original Message- From: ZHAO, BING [mailto:[EMAIL PROTECTED] Sent: domingo, 23 de Outubro de 2005 7:28 Cc: beginners@perl.org Subject: delete file after on week

Re: CPAN module for file upload/download

2005-10-24 Thread Chris Devers
On Mon, 24 Oct 2005, Dhanashri Bhate wrote: Could anyone please suggest what module is available on CPAN for this? Take a look at WWW::Mechanize. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Module subclassing

2005-10-24 Thread Charles K. Clarkson
Peter Rabbitson wrote: [snipped helpful code] : And all is well if I create a new number and print it back, : both bstr() and fmtstr() work just as expected. However any : arithmetics fails with an "Unknown round mode ''" error. I : looked at Math::Currency which is a r

Re: map/array performance

2005-10-24 Thread Frank Bax
At 10:07 PM 10/23/05, Jeff 'japhy' Pinyan wrote: On Oct 23, Frank Bax said: my $aval=''; map { $aval=$aval.sprintf("%4d",$aSuit{$a}{$_}); } @f_seq; my $aval=''; foreach $f (@f_seq) { $aval=$aval.sprintf("%4d",$aSuit{$a}{$f}); } You should be using $aval .= here, instead of $

Re: Module subclassing

2005-10-24 Thread Peter Rabbitson
> [snipped helpful code] > : And all is well if I create a new number and print it back, > : both bstr() and fmtstr() work just as expected. However any > : arithmetics fails with an "Unknown round mode ''" error. I > : looked at Math::Currency which is a rather simple module > : and I still can't

HUP vs signal 9

2005-10-24 Thread Christopher Spears
What is the difference between kill 1, SIGNAL and kill 9, SIGNAL ? By reading books and talking to people, I figured out that kill 1 is the HUP (hang up signal) and kill 9 is the kill signal. Don't they do the same thing (i.e. terminate a program)? I was told that kill 1 is a "nicer" way to

RE: Module subclassing

2005-10-24 Thread Charles K. Clarkson
Peter Rabbitson wrote: : Charles asked: : : : Can you show us your test cases script, so we can see : : it fail? : : Certainly. It's a simple as: : : use Tools::Currency; : my $one = Tools::Currency->new ('1'); : print ($one + 1); : : which yields: : : perl ./tes

Re: HUP vs signal 9

2005-10-24 Thread Wiggins d'Anconia
Christopher Spears wrote: > What is the difference between > > kill 1, SIGNAL > > and > > kill 9, SIGNAL ? > > By reading books and talking to people, I figured out > that kill 1 is the HUP (hang up signal) and kill 9 is > the kill signal. Don't they do the same thing (i.e. > terminate a pro

Troubles getting a value out of an XML object

2005-10-24 Thread Dave Adams
I am having troubles getting a value out of an XML object. *Here is my object:* my $xml = new XML::Simple; my $data = $xml->XMLin($ResponseDoc); *Here is the script asking for a snippet of data:* print Dumper($data->{CreateLock}); ** *Here is the output:* $VAR1 = { 'DatabaseId' => 'db1', 'Recor

RE: delete file after on week

2005-10-24 Thread Steve Bertrand
> I need to delete files older than one week old, > I know how to code that(with the help of many kind people on > this list): Here is a single command that will blow files older than 48 hours away from given directory. You can put as many of these in a single sh script as you want

Re: Troubles getting a value out of an XML object

2005-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Dave Adams said: my $xml = new XML::Simple; my $data = $xml->XMLin($ResponseDoc); print Dumper($data->{CreateLock}); $VAR1 = { 'DatabaseId' => 'db1', 'RecordNumber' => '23617', 'Id' => 'test' }; *Question:* How do I get the value of RecordNumber? You knew how to get 'Create

Re: rename and move multiple files

2005-10-24 Thread perlwannabe
<> >> So I suppose I want to do a locate, rename, move. 1) locate all >> "output.txt" files on the hard drive; 2) rename each "output.txt" to >> something unique, and 3) move each renamed file from its original >> location >> to a single directory. >> >> I have tried a few ways with no success.

Re: rename and move multiple files

2005-10-24 Thread perlwannabe
<> >> >> So I suppose I want to do a locate, rename, move. 1) locate all >> "output.txt" files on the hard drive; 2) rename each "output.txt" to >> something unique, and 3) move each renamed file from its original >> location >> to a single directory. >> >> I have tried a few ways with no succes

Re: Module subclassing (solved)

2005-10-24 Thread Peter Rabbitson
> I am trying to subclass Math::Currency to change the default bstr() and > move it to a different function, so my numbers are not formatted by > default (I am unable to just strip existing formatting in a certain > situation). > ... > However any arithmetics fails with an "Unknown round mode ''

Re: Module subclassing (solved)

2005-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Peter Rabbitson said: I am trying to subclass Math::Currency to change the default bstr() and move it to a different function, so my numbers are not formatted by default (I am unable to just strip existing formatting in a certain situation). ... However any arithmetics fails with an "

Re: HUP vs signal 9

2005-10-24 Thread John W. Krahn
Christopher Spears wrote: > What is the difference between > > kill 1, SIGNAL > > and > > kill 9, SIGNAL ? > > By reading books and talking to people, I figured out > that kill 1 is the HUP (hang up signal) and kill 9 is > the kill signal. Don't they do the same thing (i.e. > terminate a pro

extract zip file

2005-10-24 Thread Pant, Hridyesh
Hi All, How to extract zip file using perl program... Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: extract zip file

2005-10-24 Thread Chris Devers
On Tue, 25 Oct 2005, Pant, Hridyesh wrote: How to extract zip file using perl program... Write the program, then run it. Have you tried writing it yet? Have you tried searching CPAN for helpful modules? -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: extract zip file

2005-10-24 Thread Tommy Nordgren
Oct 25, 2005 kl. 6:21 AM skrev Pant, Hridyesh: Hi All, How to extract zip file using perl program... Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] system '/us

Create a file

2005-10-24 Thread M. Lewis
I'm trying to create a file of a certain size. Specifically 15MB for some testing purposes. I want this file to have random characters. I'm sure it would be easier (faster) to use the same character. What I'm finding is my code is terribly slow to create a 15MB file. Is there a better / more e

RE: extract zip file

2005-10-24 Thread Pant, Hridyesh
Thanks.. Now I want to change the string in file. orgtext="C:\\test"; newtext="/bin/old"; I tired $intext =~ s/$orgtext/$newtext/ms; but this is not working.. Any help.. Regards Hridyesh -Original Message- From: Chris Devers [mailto:[EMAIL PROTECTED] Sent: 25 October 2005 10:21 To: Pant,