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
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
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
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
&
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/
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
__
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
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
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
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
.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
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
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
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
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
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
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/
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
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.
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
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
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
22 matches
Mail list logo