Re: removing white spaces

2001-07-17 Thread dave hoover
javier wrote: > It sounds a bit stupid but I don't know the way to > remove white spaces in a > string. > > $string = "No sé como quitar los putos spacios"; > and now? $string =~ s/ //g; Here's one way to do it. = Dave Hoover "Twice bl

Re: How do I set @INC?

2001-07-12 Thread Dave Hoover
does little for you in terms of > choosing the correct interpreter for the script. I'm basically ignorant about perl in windows. This is good to know. Thanks for clearing things up. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave

Re: How do I set @INC?

2001-07-11 Thread Dave Hoover
mple: #!/apps/perl/5.6.0/bin/perl Just remember that if you're trying to test the script from the command line, rather than typing: % perl instead you would type % /apps/perl/5.6.0/bin/perl HTH = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave

Re: "the right way"

2001-07-09 Thread dave hoover
Paul wrote: > On Mon, Jul 09, 2001 at 09:44:57AM -0700, dave > hoover wrote: > > > I think it's a matter of style, but also one > should > > consider who will be maintaining this code in the > > future and whether they will be familiar with Perl > or &

Re: "the right way"

2001-07-09 Thread dave hoover
lly for some (like me) and has a nicer look (to me) because there are less brackets. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: Help with global variable

2001-07-09 Thread dave hoover
utine like this: return $input; You don't have to use $input, you could pass anything back. Now $test_return will hold whatever you returned! > } HTH = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __

Re: foreach examples/usage

2001-07-07 Thread dave hoover
n Perl. I'd suggest checking out http://learn.perl.org and purchasing one of their book suggestions. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do You Yahoo!? G

Re: Another Newbie

2001-07-06 Thread dave hoover
hink that learning Linux would _necessarily_ make you a better Perl programmer, but I would definitely encourage you to install Linux on any computer you have at your disposal...it's a beautiful thing. = Dave Hoover "Twice blessed is help unl

Re: creating columns on the fly

2001-07-05 Thread dave hoover
ase first to see if it's there, then based on the results, construct your SQL statement with UPDATE/INSERT accordingly. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do Y

Re: Code Review Needed!

2001-06-29 Thread dave hoover
have received thus far has been very helpful. It's been a learning experience...particularly about taint checking! Thanks, --Dave --- dave hoover <[EMAIL PROTECTED]> wrote: > I would greatly appreciate ANY feedback anyone could > provide. The following page will provide details and

help with running -T

2001-06-29 Thread dave hoover
.00401 /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/sun4-solaris /usr/local/lib/perl5/site_perl) at tst line 3. BEGIN failed--compilation aborted at tst line 3. I can't figure out why this is happening. Can anyone help? = Dave Hoover "Twice blessed is help unlo

Taint checking with -T

2001-06-29 Thread dave hoover
When I added -T to an existing Perl script, I got the error message: Too late for "-T" option at main.cgi line 1. Is this a common error message with -T? What am I doing wrong? You can get the source at: http://www.redsquirreldesign.com/soapbox = Dave Hoover "Twice

Code Review Needed!

2001-06-28 Thread dave hoover
I would greatly appreciate ANY feedback anyone could provide. The following page will provide details and a link to download the tarball. http://www.redsquirreldesign.com/soapbox TIA = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesig

Re: arrays

2001-06-28 Thread dave hoover
elements in @servernames To print out each of the elements, do this: foreach $name (@servernames) { print "$name\n"; } Another way to do the above is this: for (@servernames) { print "$_\n"; # when no placeholder variable is specified, by default the $_ variable is

Re: arrays

2001-06-28 Thread dave hoover
to an array > so I can do something > with each different ServerName? Thank you everyone. > > Tyler Try this: - open(FILE, "httpd.conf"); while () { push(@server_names, $1) if /ServerName\s+(.*)/ } close FILE; - Now

Re: array slice question

2001-06-26 Thread dave hoover
a discussion that mirrors your predicament. I don't have time to read it right now, but maybe it will shed some light on the subject for you. http://groups.google.com/groups?hl=en&safe=off&th=94cd69e466afd840,11&start=0&ic=1 = Dave Hoover "Twice blessed is help

Re: sort by value?

2001-06-26 Thread dave hoover
plit(/\t/); $ch{$fields[0]} = $fields[1]; } close FILE; for (sort { $ch{$a} <=> $ch{$b} } keys %ch) { print "$_: $ch{$_}\n"; } = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: sort by value?

2001-06-26 Thread dave hoover
HTH BTW, I got the sort answer from "Effective Perl Programming" by Joseph Hall, a book I HIGHLY recommend to beginners (such as myself) once they've worked through the Llama and given the Camel a few tries. = Dave Hoover "Twice bless

Re: Online books

2001-06-22 Thread dave hoover
jaya kumaran wrote: > Is there any free online books availabe to learn > perl script? Here's about 50 of them: http://dmoz.org/Computers/Programming/Languages/Perl/Documentation/Tutorials/ HTH = Dave Hoover "Twice blessed is help unlooked for.

Re: Advice for Perl Class

2001-06-21 Thread dave hoover
If I were to fly out to Portland and take the track mentioned below, how much would that cost? I couldn't find the rates for these on the Stonehenge site. Feel free to email me directly at: [EMAIL PROTECTED] Thanks, --Dave Hoover --- "Randal L. Schwartz" <[EMAIL PROTECTED

Advice for Perl Class

2001-06-21 Thread dave hoover
me training money to learn more about whatever I want. I want to learn more about Perl and Networks and CGI. I live in the Chicago area and I need some recommendations about where I could find some excellent classes nearby. TIA = Dave Hoover "Twice blessed is help unlo

Re: Cannot get a connect to Mysql using DBI !!!!!!!!!!!

2001-06-20 Thread dave hoover
ABASE_NAME Is "products\@192.168.1.170:3306" really the name of your database? Looks like you should change it back to simply read "products," but keep your username and password as is (thrawn, rootroot). Give it a try (if you haven't already), I'm not sure if this w