Re: rename all files

2005-02-20 Thread John W. Krahn
xuantl wrote: Hi all, Hello, I wan't to change name of all the files in a directory(incluing sub directorys) to lowercase. the code: --- use File::Find; $rootDir='.'; find (\&lowerCase, $rootDir); find (sub{print "$File::Find::name\n"}, $rootDir); sub lowerCa

Re: Passing an object to a subroutine via hash?

2005-02-20 Thread alctraz
If you are only looking for the terminology, this is called 'Pass by Reference': http://www.perlpod.com/5.8.4/pod/perlsub.html#Pass%20by%20Reference On Sun, 20 Feb 2005 02:30:34 -0500, Chris <[EMAIL PROTECTED]> wrote: > Greetings, > > I don't know what the proper terminology is for what I want

spaces in filenames on winXX

2005-02-20 Thread Harry Putnam
Scripting in perl on a Windows OS and spaces in file names. I'm pretty sure this has been covered many times here, and I believe there are modules and such devoted to the problem but searching on www.cpan.org with various search strings hasn't turned up something specifically for this problem,

Re: spaces in filenames on winXX

2005-02-20 Thread John W. Krahn
Harry Putnam wrote: Scripting in perl on a Windows OS and spaces in file names. I'm pretty sure this has been covered many times here, and I believe there are modules and such devoted to the problem but searching on www.cpan.org with various search strings hasn't turned up something specificall

Re: spaces in filenames on winXX

2005-02-20 Thread Jenda Krynicky
From: Harry Putnam <[EMAIL PROTECTED]> > Scripting in perl on a Windows OS and spaces in file names. > > I'm pretty sure this has been covered many times here, and I believe > there are modules and such devoted to the problem but searching on >www.cpan.org > with various search strings hasn't

Re: spaces in filenames on winXX

2005-02-20 Thread Harry Putnam
"Jenda Krynicky" <[EMAIL PROTECTED]> writes: > Try to write the script you need and come back if you run into > problems. This isn't in keeping with Johns point about using opendir/readdir but I'm not sure I followed that anyway. Here is an example of problems before even getting to spaces. Do

Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Harold Castro
Hi, I'm new to perl and i'm trying to create a simple program that will act like a time bomb but will print a dot(something like a progress bar every second until the specified time arrives. Here's my code. my $countdown = 5; while ($countdown > 0){ print "\."; sleep 1; $countdown--; } print "Ka

RE: spaces in filenames on winXX

2005-02-20 Thread Charles K. Clarkson
Harry Putnam <> wrote: : Here is an example of problems before even getting to spaces. : Doesn't this mean that some kind of preprocessing must take : place? : : #!C:\Perl\bin -w Shame! Always use strictures (except when mumble, mumble, mumble). use strict; : ## This is the format that

RE: Perl waits for while to finish before printing if on the same line,why?(countdown prog)

2005-02-20 Thread TapasranjanMohapatra
-Original Message- From: Harold Castro [mailto:[EMAIL PROTECTED] Sent: Mon 2/21/2005 9:42 AM To: beginners@perl.org Cc: Subject:Perl waits for while to finish before printing if on the same line,why?(countdown prog) Hi, I'm new to perl and i'm trying to create a s

RE: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Charles K. Clarkson
Harold Castro <[EMAIL PROTECTED]> wrote: : my $countdown = 5; : while ($countdown > 0){ : print "\."; No need to escape the period in a double quoted string. : sleep 1; : $countdown--; : } : print "Kaboom!!" : : And the result.. : after waiting for 5 seconds, it displayed this line at once

printing output of a command

2005-02-20 Thread TapasranjanMohapatra
All, i am new to cgi. Please let me know why I dont get the data printed? I have abc.cgi in /var/www/cgi-bin When the $cmd is "ls" I get the filenames when I visit localhost/cgi-bin/abc.cgi But when the $cmd is the snmpquerry, I get nothing on the page, though I get the desired output(value of sy

Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Mark Jayson Alvarez
Hi, I'm new to perl and i'm trying to create a simple program that will act like a time bomb but will print a dot(something like a progress bar every second until the specified time arrives. Here's my code. my $countdown = 5; while ($countdown > 0){ print "\."; sleep 1; $countdown--; } print "Ka

Re: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Gavin Henry
On Monday 21 Feb 2005 04:08, Mark Jayson Alvarez wrote: > Hi, > I'm new to perl and i'm trying to create a simple > program that will act like a time bomb but will print > a dot(something like a progress bar every second until > the specified time arrives. Here's my code. > > my $countdown = 5; >

RE: Perl waits for while to finish before printing if on the same line,why?(countdown prog)

2005-02-20 Thread Manav Mathur
Try this my $countdown = 5; local $|=1 ; while ($countdown > 0){ print "\."; sleep 1; $countdown--; } print "Kaboom!!" -Original Message- From: Mark Jayson Alvarez [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 9:39 AM To: beginners@perl.org Subject: Perl waits for while to fi

RE: Perl waits for while to finish before printing if on the sameline,why?(countdown prog)

2005-02-20 Thread Mallik
Still the result is same. -Original Message- From: Manav Mathur [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:11 PM To: Mark Jayson Alvarez; beginners@perl.org Subject: RE: Perl waits for while to finish before printing if on the sameline,why?(countdown prog) Try this m

RE: Perl waits for while to finish before printing if on thesameline,why?(countdown prog)

2005-02-20 Thread Manav Mathur
Are you using it as a command line tool or as CGI etc?? Manav -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:12 PM To: beginners@perl.org Cc: 'Manav Mathur'; 'Mark Jayson Alvarez' Subject: RE: Perl waits for while to finish before printing if

RE: Perl waits for while to finish before printing if onthesameline,why?(countdown prog)

2005-02-20 Thread Mallik
Hi Manav, Same code is working as expected in Unix OS, but not in Windows. Thanks, Mallik. -Original Message- From: Manav Mathur [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:17 PM To: Mallik; beginners@perl.org Cc: 'Mark Jayson Alvarez' Subject: RE: Perl waits for while t

RE: Perl waits for while to finish before printing ifonthesameline,why?(countdown prog)

2005-02-20 Thread Manav Mathur
The same code works here on ActivePerl. As far as I know, some web-servers do default buffering...thats why I asked if you were using it as CGI Manav -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:21 PM To: 'Manav Mathur'; beginners@perl.o

RE: Perl waits for while to finish before printingifonthesameline,why?(countdown prog)

2005-02-20 Thread Mallik
I am using it as a command line tool. I have perl configured in Edit Plus. Thru edit plus, it is not working as expected, where as from command line, it is working fine. Mallik. -Original Message- From: Manav Mathur [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:28 PM To: Ma