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

2005-02-21 Thread Vladimir D Belousov
Charles K. Clarkson wrote: 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 displ

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

2005-02-21 Thread Thomas Bätzler
Mark Jayson Alvarez <[EMAIL PROTECTED]> asked: [...] > Why does this happens with a while loop? I told it to print a > single dot every 1 second. Do you know another way of making > my progress bar program that display a single dot every one > second on the same line until it reaches a given tim

finding the name/IPs of the computers from the lan

2005-02-21 Thread Octavian Rasnita
Hi, Does anyone know a perl module that helps me to create a program that finds the pairs computer_name/IP_address for all the computers from the LAN? It would be very helpful if I could also find out the workgroups of those computers. Thank you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: spaces in filenames on winXX

2005-02-21 Thread Harry Putnam
"Charles K. Clarkson" <[EMAIL PROTECTED]> writes: [...] > You have three choices. [...] snipped techniques So back to my original question: Is there a module or something that takes care of that pre processing for me? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

RE: spaces in filenames on winXX

2005-02-21 Thread Charles K. Clarkson
Harry Putnam <> wrote: : So back to my original question: : Is there a module or something that takes care of that pre : processing for me? There is no pre-processing. I use this same idiom on either platform. What do you mean by pre-processing? my $file = 'foo/bar/baz/no pre-processing

Cannot connect

2005-02-21 Thread Octavian Rasnita
Hi, I have installed MySQL 4.1.1 under Windows 2000, and I have checked to also include the development files, the C libraries, etc, but after trying to connect to an existing database, I got the following error: DBI connect('database=presa;host=localhost','root',...) failed: Client does not supp

Re: spaces in filenames on winXX

2005-02-21 Thread Jean-Sébastien Guay
Harry, You have three choices. [...] snipped techniques So back to my original question: Is there a module or something that takes care of that pre processing for me? I think you misunderstood. The problem with your script is not the spaces in the string. It's that you used a single b

Re: Passing an object to a subroutine via hash?

2005-02-21 Thread Wiggins d'Anconia
Chris wrote: Greetings, I don't know what the proper terminology is for what I want to do, so if somebody can tell me what it is, that would be great. Basically I have my core code, then lots of subroutines. Right now I pass data to subroutines via a "parameter" hash. How can I pass an object th

perl.beginners Weekly list FAQ posting

2005-02-21 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: Cannot connect

2005-02-21 Thread Vladimir D Belousov
MySQL 4.1 and hiegher require different auth methods than older versions. You have to upgrade your DBI.pm && DBD/mysql.pm. In the other way you may reset the password(s) to the old style: mysql> SET PASSWORD FOR -> '/|some_user|/'@'/|some_host|/' = OLD_PASSWORD('/|newpwd|/'); Follow this link: h

Re: Setting a Hash Using the Contents of a File

2005-02-21 Thread John W. Krahn
Jon Mathews wrote: Not sure how else to word this. Basically, I have a util which reads a config file That is one "wheel" that has been invented many times before: http://search.cpan.org/author/MWS/CONFIG-V0.99.11/Hash.pm http://search.cpan.org/author/AVAJADI/Config-Abstract-0.12/Abstract.pm http:

Environment variables

2005-02-21 Thread Jason Wozniak
Hello, I'm trying to write a paging script that connects to several databases in succession, and was attempting to write the script such that I would not have to hard code any user names, or passwords, by using an externally identified user. I can connect to the first database in t

RE: Environment variables

2005-02-21 Thread Jason Wozniak
That's what I thought, but it doesn't work, which is why I tried system. The below code: use DBI; my $database; #my $address = "[EMAIL PROTECTED]"; my $address = "[EMAIL PROTECTED]"; my %attr; my $dbh; open MAIL, "|mail $address"; open DBFILE, ") { $ENV{ORACLE_SID} == chomp($_); print "$ENV{ORAC

Delete an element in an array

2005-02-21 Thread Oliver Fuchs
Hi, I want to save names from to an array. Afterwards I want to delete a single name in the array received again from . This is what I have: #!/usr/bin/perl use warnings; print "Some names please: \n"; @names = ; print "Delete one name? \n"; $deleted = ; foreach $item (@names) { unles

RE: Environment variables

2005-02-21 Thread Graeme St. Clair
The following works for me on a Windows XP box talking to a Solaris server:- BEGIN { if (($^O eq 'MSWin32') or ($^O =~ /cygwin/i)) { # $ENV{ORACLE_HOME} = q{C:/Oracle/Ora81}; # But Oracle::DBD will find it from the Windows registry anyway } else { $ENV{ORACLE_HOME} = q{/path/to/p

RE: Delete an element in an array

2005-02-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Oliver Fuchs wrote: > Hi, > > I want to save names from to an array. > Afterwards I want to delete a single name in the array received again > from . > > This is what I have: > > #!/usr/bin/perl > > use warnings; > > print "Some names please: \n"; > @names = ; > print "Delete one name? \n"; >

Re: Delete an element in an array

2005-02-21 Thread Bob Showalter
Oliver Fuchs wrote: Hi, I want to save names from to an array. Afterwards I want to delete a single name in the array received again from . This is what I have: #!/usr/bin/perl use warnings; We always recommend: use strict; print "Some names please: \n"; @names = ; print "Delete one name? \n"; $

Editing config file entries in between brackets{ } Ex. define host{ hostname value... }

2005-02-21 Thread Harold Castro
Hi, I'm editing a software(nagios)configuration files and I thought it would be much easier if I could just create a perl script to edit such files. Though I have very little ideas coming on how to accomplish this task. I need some tips for this one. The config file format is like this: define h

[Maybe OT]

2005-02-21 Thread James W. Thompson, II
This isn't a technical question and I know no one here can/should probably dispense legal advice; but does anyone know of some good resources (other than talking to a lawyer) regarding freelance programming/consulting contracts? -- James W. Thompson, II (New Orleans, LA) -- To unsubscribe, e-ma

shell scripting newsgroup

2005-02-21 Thread Christopher Spears
Is there a forum similar to this for shell scripting? I mainly work in csh. = "I'm the last person to pretend that I'm a radio. I'd rather go out and be a color television set." -David Bowie "Who dares wins" -British military motto "The freak is the norm." - "The Infernal Desire Machines

Re: shell scripting newsgroup

2005-02-21 Thread Owen Cook
-- On Mon, 21 Feb 2005, Christopher Spears wrote: > Is there a forum similar to this for shell scripting? > I mainly work in csh. There comp.unix.shell If you hang out in there for a while you might find something, but the ng is pretty good anyway Owen -- To unsubscribe, e-mail: [EMA

Re: shell scripting newsgroup

2005-02-21 Thread Chris Devers
On Mon, 21 Feb 2005, Christopher Spears wrote: > Is there a forum similar to this for shell scripting? > I mainly work in csh. I'm so sorry. Is it redundant to point out this essay / rant ? Can you at least switch from csh to Bourne sh