Re: zip command in perl

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: snip > I downloaded the zip file from CPAN > > But i am not getting one point > > which command i should use in perl . i mean what is the syntax. > which module i should choose from that zip file after unzipping. (zip.pm ?) > snip The compressed

Re: zip command in perl

2006-04-06 Thread Irfan J Sayed
Hi Chas, I downloaded the zip file from CPAN But i am not getting one point which command i should use in perl . i mean what is the syntax. which module i should choose from that zip file after unzipping. (zip.pm ?) plz let me know. Regards Irfan Sayed "Chas Owens" <[EMAIL PROTECTED]>

Re: zip command in perl

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi, > > I need to zip my backup dir. so that it will automatically convert my > backup dir to backup.zip file > can it be happen through perl ? > > Any sol. on this? > > Regards > Irfan Sayed Are you familiar with http://search.cpan.org? It is

zip command in perl

2006-04-06 Thread Irfan J Sayed
Hi, I need to zip my backup dir. so that it will automatically convert my backup dir to backup.zip file can it be happen through perl ? Any sol. on this? Regards Irfan Sayed

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Hi, Following command works fine. use File::Copy::Recursive qw(dircopy); dircopy($source, $target); Thanks for all your help. Regards Irfan Sayed "JupiterHost.Net" <[EMAIL PROTECTED]> 04/07/2006 12:05 AM To beginners@perl.org cc Subject Re: windows command help Chas Owens wr

Re: windows command help

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi Chas, > > I corrected. but still same error. > > I put as use File::Xcopy; > > Any other sol. plz > > Regards > Irfan Sayed snip Are you sure that the module is installed? You can find out easily by running the following command. perl -MFi

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Hi Chas, I corrected. but still same error. I put as use File::Xcopy; Any other sol. plz Regards Irfan Sayed "Chas Owens" <[EMAIL PROTECTED]> 04/07/2006 10:02 AM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: windows command help On 4/7/06, Irfan J Saye

Re: windows command help

2006-04-06 Thread Chas Owens
On 4/7/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: snip > use file::Xcopy; > syscopy("D:\\vobs","D:\\backup"); > > Any sol. on this plz? > > Regards > Irfan Sayed snip If that is exactly the code you used then the problem is "use file::Xcopy;". It should read "use File::Xcopy;" -- To unsubscrib

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Hi, I tried the option given by you but it's throwing following error. Undefined subroutine &main::syscopy called at C:\irfan\backup.pl line 20 I did following thing use file::Xcopy; syscopy("D:\\vobs","D:\\backup"); Any sol. on this plz? Regards Irfan Sayed Irfan J Sayed/India/[EMAIL

Re: Data structure key as a literal string

2006-04-06 Thread Chas Owens
On 4/6/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > > > >You should consider RTFM'ing. > > > Hello,what's RTFM then? snip Read The Furnished Materials Read The Fine Manual Read The F'ing Manual etc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data structure key as a literal string

2006-04-06 Thread Jeff Pang
> >You should consider RTFM'ing. > Hello,what's RTFM then? -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data structure key as a literal string

2006-04-06 Thread Chas Owens
On 4/6/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Thu, 2006-06-04 at 19:48 -0700, Randal L. Schwartz wrote: > > Perl interpreter: me reading the answer to them from the Fine Manual. > > OK, I'll bite. What's a 'Fine Manual?" (You're not going to charge me > money for this, are you?) sni

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 19:48 -0700, Randal L. Schwartz wrote: > Perl interpreter: me reading the answer to them from the Fine Manual. OK, I'll bite. What's a 'Fine Manual?" (You're not going to charge me money for this, are you?) -- __END__ Just my 0.0002 million dollars worth, --- Shawn

Re: Data structure key as a literal string

2006-04-06 Thread Randal L. Schwartz
> "Ryan" == Ryan Gies <[EMAIL PROTECTED]> writes: Ryan> Now I'm confused, what's the difference between a Perl interrupter and a Ryan> Perl interpreter? Or, what perldoc is that info in? Perl interrupter: someone who IM's me with a Perl question. Perl interpreter: me reading the answer to th

Re: Zombie Trouble Shooting

2006-04-06 Thread Chas Owens
On 4/6/06, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > If you had strictures enabled then perl would have told you. Make sure that > this is near the top of your programs: > > use strict; snip Yes, always good advice. Unfortunately it would not have helped me here since I was using the Perl

Re: Zombie Trouble Shooting

2006-04-06 Thread John W. Krahn
Chas Owens wrote: > On 4/6/06, John W. Krahn <[EMAIL PROTECTED]> wrote: > snip >>No, the lexical $handler holds the anonymous subroutine. > snip > > Ah, you are right, the code should be If you had strictures enabled then perl would have told you. Make sure that this is near the top of your prog

Re: Zombie Trouble Shooting

2006-04-06 Thread Chas Owens
On 4/6/06, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > No, the lexical $handler holds the anonymous subroutine. snip Ah, you are right, the code should be { #setup the auto-reaper for fork'ed children my $handler; $handler = sub { my $pid; while (($pid = waitpid(-1, &W

Re: Zombie Trouble Shooting

2006-04-06 Thread John W. Krahn
Chas Owens wrote: > On 4/6/06, John W. Krahn <[EMAIL PROTECTED]> wrote: > snip >>>use POSIX ":sys_wait_h"; >>> >>>my $handler = sub { >>>my $pid; >>>while (($pid = waitpid(-1, &WNOHANG)) > 0) { >>># do something with $pid >>>} >>>$SIG{CHLD} = $handler #reinstall the handler

Re: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread John W. Krahn
RICHARD FERNANDEZ wrote: > Hi Folks, Hello, > I have a job that takes in an encrypted file and decrypts it using > Crypt::GPG. > > > for my $encrypted_file (@files) { > > open(CIPHERTXT, $encrypted_file) or croak "Can't open > encrypted_file: $encrypted_file\n"; You should

Re: Zombie Trouble Shooting

2006-04-06 Thread Chas Owens
On 4/6/06, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > > use POSIX ":sys_wait_h"; > > > > my $handler = sub { > > my $pid; > > while (($pid = waitpid(-1, &WNOHANG)) > 0) { > > # do something with $pid > > } > > $SIG{CHLD} = $handler #reinstall the handler > > When perl c

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread John W. Krahn
Michael Goldshteyn wrote: > That is, why does the output differ between: > > perl -e "print join(\"\n\",@{[`dir`]});" > > and > > dir | perl -pne "" $ which dir $ alias dir alias dir='ls -l' $ unalias dir $ alias dir bash: alias: dir: not found $ which dir /usr/bin/dir It looks like the first

Re: Zombie Trouble Shooting

2006-04-06 Thread John W. Krahn
Chas Owens wrote: > > You can also use $SIG{CHLD} to install a handler if you are not as > heartless as I am. This is similar to calling waitpid() in your main > loop, but has the benefit of handling all children as soon as > possible. The only drawback is that make the code harder to read and >

Re: What is Variable Interpolation [was: Re: Help Required on the Script]

2006-04-06 Thread John W. Krahn
D. Bolliger wrote: > > btw, @04 is not a valid (array) variable name; they must not start with a > digit, as not keyword/builtin does. $ perl -Mwarnings -Mstrict -le' our @04 = 10 .. 14; print "@04"' 10 11 12 13 14 You are probably thinking scalars and/or lexicals. John -- use Perl; program

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 16:06 -0500, JupiterHost.Net wrote: > my $fruit = $hash->{'food'}{'fruit'}[0]; > print "Name: $fruit->{'name'}\n", "Color: $fruit->{'color'}\n"; That should be: my $fruit = $hash{'food'}{'fruit'}[0]; 'hash' is a real hash, not a reference. -- __END__ Just my 0.000

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 14:38 -0700, Ryan Gies wrote: > Now I'm confused, what's the difference between a Perl interrupter and a > Perl interpreter? Or, what perldoc is that info in? Oops. You are correct. That should have been 'interpreter'. -- __END__ Just my 0.0002 million dollars worth

Re: Data structure key as a literal string

2006-04-06 Thread Ryan Gies
Now I'm confused, what's the difference between a Perl interrupter and a Perl interpreter? Or, what perldoc is that info in? Thanks Mr. Shawn H. Corey wrote: On Thu, 2006-06-04 at 13:10 -0700, Ryan Gies wrote: With the intention of optimization, I am looking for a way around using *eval* in

Re: Data structure key as a literal string

2006-04-06 Thread JupiterHost.Net
Ryan Gies wrote: With the intention of optimization, I am looking for a way around using *eval* in the below snippet at line 19: my $value = eval $key; The objective is to get from $key to $value, knowing that $key is a literal string. Thank you for an insights! #!/usr/bin/perl -w

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 13:35 -0500, JupiterHost.Net wrote: > perl -e 'print for `dir`;' > > Is even sexxierr :) dir /w Not sexy but simple. -- __END__ Just my 0.0002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them."

RE: Date difference.

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 11:03 -0700, Timothy Johnson wrote: > I saw that someone already recommended Date::Calc, but I'll make another > suggestion: Time::Local. It's a much more lightweight module, and it > depends on your ultimate needs, but it's a good one to be familiar with. > It takes text da

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 13:10 -0700, Ryan Gies wrote: > With the intention of optimization, I am looking for a way around using > *eval* in the below snippet at line 19: > > my $value = eval $key; Please say this is a late April Fool's joke. Your suggested use of eval is not optimal. This is

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Dr.Ruud
Michael Goldshteyn schreef: > By the way, the output of perl -e "print `dir`;" has: > > - All files/dirs with spaces have the spaces escaped with a backslash > (e.g. a file such as "Hello there.txt" looks like "Hello\ there.txt" > - The output is similar to dir /W, except that the header > (volume

Data structure key as a literal string

2006-04-06 Thread Ryan Gies
With the intention of optimization, I am looking for a way around using *eval* in the below snippet at line 19: my $value = eval $key; The objective is to get from $key to $value, knowing that $key is a literal string. Thank you for an insights! #!/usr/bin/perl -w use strict; use Data:

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Michael Goldshteyn
"Jay Savage" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 4/6/06, Michael Goldshteyn <[EMAIL PROTECTED]> wrote: >> Point taken about the call to join(). >> >> With regards to the difference between the two samples, the difference is >> larger than new-lines. DIR from the comman

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Jay Savage
On 4/6/06, Michael Goldshteyn <[EMAIL PROTECTED]> wrote: > Point taken about the call to join(). > > With regards to the difference between the two samples, the difference is > larger than new-lines. DIR from the command line shows info about file like > their date of last change and size. It also

RE: Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Timothy Johnson
D'oh! I would have caught that for you sooner, but it looks like I was using one of the proposed solutions instead of the OP code. The reason for the difference is that 'dir' is not a program, it's a built-in command defined by the cmd.exe shell. When people start using Monad more I anticipate

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Michael Goldshteyn
The answer to my own question in the OP. There is a difference, because the following should be performed to get the behavior of: dir | perl -pne "" perl -e "print `cmd /C dir`;" the cmd /C part is required to get equivalent behavior. Mystery solved! "Michael Goldshteyn" <[EMAIL PROTECTED]> w

RE: windows command help

2006-04-06 Thread Timothy Johnson
It wasn't Windows did the copy in this case, but it was the result of an issue that almost all Win32 Perl users out there run into pretty quickly, which is forgetting to escape backslashes in file paths when using double-quotes. Another module to look into is Win32::FileOp, which is very nice if

Re: windows command help

2006-04-06 Thread JupiterHost.Net
Chas Owens wrote: On 4/6/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: Hi All, I need to run the windows copy command from command prompt to copy several folders and files in specific folder to another folder I am running following command C:\Documents and Settings\Administrator>copy D:\vo

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread JupiterHost.Net
Michael Goldshteyn wrote: Point taken about the call to join(). perl -e 'print for `dir`;' Is even sexxierr :) With regards to the difference between the two samples, the difference is larger than new-lines. DIR from the command line shows info about file like their date of last chang

RE: Date difference.

2006-04-06 Thread Timothy Johnson
I saw that someone already recommended Date::Calc, but I'll make another suggestion: Time::Local. It's a much more lightweight module, and it depends on your ultimate needs, but it's a good one to be familiar with. It takes text dates and converts them to Perl time() format. -Original Mess

Re: Zombie Trouble Shooting

2006-04-06 Thread Chas Owens
On 4/6/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: snip > Zombies happen for two reasons. The first it that it is waiting for its > parent to harvest its status code. snip Just to expand on this, there are several methods of harvesting the status code of your children. The first is simply w

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Thanks Chas, That is what i was looking for. Regards Irfan Sayed "Chas Owens" <[EMAIL PROTECTED]> 04/06/2006 10:38 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: windows command help On 4/6/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi All, > > I n

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Michael Goldshteyn
Point taken about the call to join(). With regards to the difference between the two samples, the difference is larger than new-lines. DIR from the command line shows info about file like their date of last change and size. It also shows how many bytes are used in the directory being DIRed and

RE: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread Smith, Derek
-Original Message- From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 12:45 PM To: beginners@perl.org Subject: RE: Crypt::GPG produces an empty cleartext file What version of Crypt:GPG are u using? Derek Bellner Smith Unix Systems Engineer Cardina

Re: windows command help

2006-04-06 Thread Chas Owens
On 4/6/06, Chas Owens <[EMAIL PROTECTED]> wrote: snip > deepcopy("D:\vobs" "D:"); snip Whoops, I said it was untested code. This line should read either deepcopy("D:\\vobs", "D:"); or deepcopy("D:/vobs", "D:"); depending on your style. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: windows command help

2006-04-06 Thread Chas Owens
On 4/6/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi All, > > I need to run the windows copy command from command prompt to copy several > folders and files in specific folder to another folder > > I am running following command > > C:\Documents and Settings\Administrator>copy D:\vobs d: > D:\v

RE: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread RICHARD FERNANDEZ
What version of Crypt:GPG are u using? Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio 614-757-5000 Main 614-757-8075 Direct 614-652-4336 Fax [EMAIL PROTECTED] Hi Derek, Thanks for your response. I'm using: Crypt::GPG version 1.42 Perl version 5.6.0 gpg version 1.0.6 --

What is Variable Interpolation [was: Re: Help Required on the Script]

2006-04-06 Thread D. Bolliger
Mazhar am Donnerstag, 6. April 2006 11.48: > thanks Raymond for the help it works, > and what do u mean by variable interpolation Hello Mazhar It will help you a lot to know and use the documentation system of perl. You can get an overview by typing (on the command line): perldoc perl (docs) p

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Jay Savage
On 4/6/06, Michael Goldshteyn <[EMAIL PROTECTED]> wrote: > That is, why does the output differ between: > > perl -e "print join(\"\n\",@{[`dir`]});" > > and > > dir | perl -pne "" First of all, you haven't told us how it differs. Since dir is an os-specific command, most of the people on this list

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread JupiterHost.Net
Michael Goldshteyn wrote: What does different environments mean? Why should the two uses of dir differ in their output? because system calls rely on you ENV via CLI and %ENV when called in perl. (IE *you* are executing it in CLI and *perl* is executing it when using backticks = different e

RE: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread Smith, Derek
-Original Message- From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 12:20 PM To: beginners@perl.org Subject: Crypt::GPG produces an empty cleartext file Hi Folks, I have a job that takes in an encrypted file and decrypts it using Crypt::GPG. for my $e

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Michael Goldshteyn
What does different environments mean? Why should the two uses of dir differ in their output? "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 2006-06-04 at 10:42 -0500, Michael Goldshteyn wrote: >> That is, why does the output differ between: >> >> perl

Crypt::GPG produces an empty cleartext file

2006-04-06 Thread RICHARD FERNANDEZ
Hi Folks, I have a job that takes in an encrypted file and decrypts it using Crypt::GPG. for my $encrypted_file (@files) { open(CIPHERTXT, $encrypted_file) or croak "Can't open encrypted_file: $encrypted_file\n"; my @ciphertxt = ; my($cleartxt, $signature)

Re: Why does dir produce different results when called from Perl

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 10:42 -0500, Michael Goldshteyn wrote: > That is, why does the output differ between: > > perl -e "print join(\"\n\",@{[`dir`]});" > > and > > dir | perl -pne "" Different environments. Use File::Find instead. See `perldoc File::Find` for details. -- __END__ Just my 0.

Why does dir produce different results when called from Perl

2006-04-06 Thread Michael Goldshteyn
That is, why does the output differ between: perl -e "print join(\"\n\",@{[`dir`]});" and dir | perl -pne "" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: windows command help

2006-04-06 Thread Jeff Pang
It's so strange that you ask that question here.Does your problem have any relations with Perl? -Original Message- >From: Irfan J Sayed <[EMAIL PROTECTED]> >Sent: Apr 6, 2006 10:52 PM >To: beginners@perl.org >Subject: windows command help > >Hi All, > >I need to run the windows copy comma

windows command help

2006-04-06 Thread Irfan J Sayed
Hi All, I need to run the windows copy command from command prompt to copy several folders and files in specific folder to another folder I am running following command C:\Documents and Settings\Administrator>copy D:\vobs d: D:\vobs\* The system cannot find the file specified. 0 file(s)

Re: Can any one tell me a better way to upload a file from the HTML form to a location in my home directorrt.

2006-04-06 Thread JupiterHost.Net
Anish Kumar K. wrote: I tried many ways, Though I am seeing the file. the SIZE IS 0. I tried out these ways use the upload() info in CGI.pm's POD, be sure to do it befpre any headers are output :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: perl help

2006-04-06 Thread JupiterHost.Net
Irfan J Sayed wrote: Hi all, Hello, I am running following clearcase command in perl my @vob_list = `cleartool lsvob -short > c:\\vob_list.txt`; I am getting output in c:\vob_list.txt file but not in the @vob_list array Your redirecting the output to the file, so its not going to STDOU

Re: Regex help

2006-04-06 Thread Jay Savage
On 4/6/06, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Owen schreef: > > I would like to accept monetary values like > > > > $234.00 > > $2678 > > > > but not values with letters like > > > > $333.oo > > > > This script below almost works, but I can't get it to catch the > > $40o.89 > > > > Is there a sim

RE: Date difference.

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 09:28 -0400, Brian Volk wrote: > > Excellent summary of most methods at > > http://perlmeme.org/faqs/datetime/comparing_dates.html. > > > > Regards > > > > James Turnbull > > Hi All, > > I'm running through the example of Date::Calc on the site listed above. > When I plug

Re: Date difference.

2006-04-06 Thread Flemming Greve Skovengaard
Brian Volk wrote: Excellent summary of most methods at http://perlmeme.org/faqs/datetime/comparing_dates.html. Regards James Turnbull Hi All, I'm running through the example of Date::Calc on the site listed above. When I plug in today's date as my birthday... it returns: I am -31 days old.

perl help

2006-04-06 Thread Irfan J Sayed
Hi all, I am running following clearcase command in perl my @vob_list = `cleartool lsvob -short > c:\\vob_list.txt`; I am getting output in c:\vob_list.txt file but not in the @vob_list array can anybody plz help me out in this regard Regards Irfan Sayed

RE: Date difference.

2006-04-06 Thread Brian Volk
> Excellent summary of most methods at > http://perlmeme.org/faqs/datetime/comparing_dates.html. > > Regards > > James Turnbull Hi All, I'm running through the example of Date::Calc on the site listed above. When I plug in today's date as my birthday... it returns: I am -31 days old. I wou

Re: Zombie Trouble Shooting

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 07:54 -0400, John Ackley wrote: > Can anyone recommend any debugging tools or techniques? If it's important for this program to be running all the time, you should add it to you init(8) rc files. Zombies happen for two reasons. The first it that it is waiting for its parent

Re: Regex help

2006-04-06 Thread Dr.Ruud
Owen schreef: > I would like to accept monetary values like > > $234.00 > $2678 > > but not values with letters like > > $333.oo > > This script below almost works, but I can't get it to catch the > $40o.89 > > Is there a simpler way to do this and catch all the conditions? See Regexp::Common::num

Re: Regex help

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 22:29 +1000, Owen wrote: > I would like to accept monetary values like > > $234.00 > $2678 > > but not values with letters like > > $333.oo > > This script below almost works, but I can't get it to catch the $40o.89 > > Is there a simpler way to do this and catch all the

Re: Can any one tell me a better way to upload a file from the HTML form to a location in my home directorrt.

2006-04-06 Thread Dr.Ruud
Anish Kumar K. schreef: > I tried many ways, Though I am seeing the file. the SIZE IS 0. Maybe this helps: http://perlmeme.org/tutorials/cgi_upload.html -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regex help

2006-04-06 Thread Thomas Bätzler
Hi, > I would like to accept monetary values like > > $234.00 > $2678 > > but not values with letters like > > $333.oo > > This script below almost works, but I can't get it to catch > the $40o.89 How about # assume ,xx is really supposed to be .xx $payment =~ s/,(\d{2})$/.$1/; # throw out

Regex help

2006-04-06 Thread Owen
I would like to accept monetary values like $234.00 $2678 but not values with letters like $333.oo This script below almost works, but I can't get it to catch the $40o.89 Is there a simpler way to do this and catch all the conditions? TIA Owen #!/usr/bin/perl while (){ chomp; $payment=$_

Zombie Trouble Shooting

2006-04-06 Thread John Ackley
I have a perl script that becomes a zombie. It runs fine for days or weeks checking for new data every 60 seconds. But after a long period of time running on Red Hat 9, Fedora Core 4, and now Fedora Core 5 it remains in memory as an active process and maintains its network tcp/ip connections but

RE: Help Required on the Script

2006-04-06 Thread Raymond Raj
> -Original Message- > From: Mazhar [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 06, 2006 3:19 PM > To: [EMAIL PROTECTED] > Cc: beginners@perl.org > Subject: Re: Help Required on the Script > > > thanks Raymond for the help it works, > and what do u mean by variable interpolation may

Re: Help Required on the Script

2006-04-06 Thread Mazhar
thanks Raymond for the help it works, and what do u mean by variable interpolation Regards Mazhar On 4/6/06, Raymond Raj <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > From: Mazhar [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 06, 2006 2:41 PM > > To: Jaime Murillo > > Cc:

Can any one tell me a better way to upload a file from the HTML form to a location in my home directorrt.

2006-04-06 Thread Anish Kumar K.
I tried many ways, Though I am seeing the file. the SIZE IS 0. I tried out these ways First One = my $upload_file= $q->param('upload_file'); # This is the description file which is being uploaded if ($upload_file) { my $outfile="/home/anish/testing.doc"; open(OUTFILE,">$outf

RE: Help Required on the Script

2006-04-06 Thread Raymond Raj
> -Original Message- > From: Mazhar [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 06, 2006 2:41 PM > To: Jaime Murillo > Cc: beginners@perl.org > Subject: Re: Help Required on the Script > > > Thank you giyz for the help i require one more help from > yourside. i have > one more code wh

Re: Help Required on the Script

2006-04-06 Thread swayam panda
Hi Mazhar, You have to escape @ sysmbol .Inside double quote perl will interpolate the value of @ and it will think @04 is an array so try #!/usr/bin/perl -w use strict; use warnings; my $string="[EMAIL PROTECTED]"; print $string; Correct me if i am wrong Thanks Swayam ---

Re: Help Required on the Script

2006-04-06 Thread Mazhar
Thank you giyz for the help i require one more help from yourside. i have one more code where in i am getting error on print of a value of a variable, below is the code #!/usr/bin/perl -w use strict; use warnings; my $string="[EMAIL PROTECTED]"; print $string; On executing the above i get the