|
|
Up |
|
|
  |
Author: Martin KißnerMartin Kißner
Date: Oct 1, 2006 22:44
Ben Morrow wrote :
>
> You almost certainly don't have the mysql client libraries installed
> correctly, or somehow you are picking up a different version from when
> you built DBD::mysql.
Okay, thank you for this information.
But still I don't know, how I can fix this.
I have read the installation instructions for DBI::mysql but I have to
admit that I do not understand too much of it.
Greetings
Martin
--
perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
[29,77,98,111,105,29],[100,93,95,103,97,110]];
for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
|
| |
|
| |
1 Comment |
|
  |
Author: ToddAndMargoToddAndMargo
Date: Oct 1, 2006 22:31
Hi All,
I am a bit new (okay A LOT NEW) to Perl. My
background is mostly Modula2 and Bash script.
Looking over an example, I notices "->" and "=>"
being used. For example:
my($sock) = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => 'exec(512)', Proto => 'tcp');
and
$sock->syswrite("0\0", 2);
$sock->syswrite($user . "\0", length($user) + 1);
What are they doing and what is are their rules?
Many thanks,
-T
|
| |
|
| |
6 Comments |
|
  |
Author: ToddAndMargoToddAndMargo
Date: Oct 1, 2006 22:23
Hi All,
I am a bit new to Perl. Does Perl have
a wait command that will suspend on the command
for a determined amount of time? Does it take
a lot of CPU cycles counting something (clock
cycles, etc.)? Or does it pretty much suspect the program
(low CPU usage)?
Many thanks,
-T
|
| |
|
4 Comments |
|
  |
Author: xhosterxhoster
Date: Oct 1, 2006 19:33
Michele Dondi wrote:
...
> while (1) {
> $cnt++;
> $val=rand; # these are the important calculations!!
> next unless $sel->can_read(0.2);
Why the 0.2? If the main task is $cnt++ and $val=rand, then it should
be spending most of it's time there and not waiting for someone to make
a connection that quite likely will not come within any given 0.2 anyway.
If you want to artificially slow down the dummy server, I would at least
move the slowdown out of the can_read, like so:
select undef,undef,undef, 0.2;
next unless $sel->can_read(0);
|
| Show full article (1.52Kb) |
|
4 Comments |
|
  |
Author: JackJack
Date: Oct 1, 2006 18:45
Hi there, does anyone know how to capture the last row in a datafile
into a variable without having to read through each record of the
entire file ?
Thank you,
Jack
|
| |
|
4 Comments |
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Oct 1, 2006 18:03
This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
3.13: How can I use curses with Perl?
The Curses module from CPAN provides a dynamically loadable object
module interface to a curses library. A small demo can be found at the
directory http://www.cpan.org/authors/Tom_Christiansen/scripts/rep.gz ;
this program repeats a command and updates the screen as needed,
rendering rep ps axu similar to top.
--------------------------------------------------------------------
|
| Show full article (1.41Kb) |
|
no comments
|
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Oct 1, 2006 12:03
This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
4.56: What happens if I add or remove keys from a hash while iterating over it?
(contributed by brian d foy)
The easy answer is "Don't do that!"
If you iterate through the hash with each(), you can delete the key most
recently returned without worrying about it. If you delete or add other
keys, the iterator may skip or double up on them since perl may
rearrange the hash table. See the entry for "each()" in perlfunc.
--------------------------------------------------------------------
|
| Show full article (1.49Kb) |
|
no comments
|
|
  |
|
|
  |
Author: Mirco WahabMirco Wahab
Date: Oct 1, 2006 10:46
Hi,
after successfully integrating the static perl-lib
into my C++-Programs, I came upon a minor annoyance
I use the perl interpreter (like so many of you
possibly do also) for input file fiddling,
among other uses.
After the C program enters its main function,
I invoke the interpreter with exactly those lines
(which is fairly standard afaik).
static PerlInterpreter *my_perl;
static char *embedding[] = { "", "-e", "0" };
...
int main(int argc, char**argv, char **envp) {
...
PERL_SYS_INIT3( &argc, &argv, &envp );
my_perl = perl_alloc();
perl_construct( my_perl );
// perl_parse(my_perl, 0, argc, argv, envp); // case #1
perl_parse(my_perl, 0, 3, embedding, envp); // case #2
|
| Show full article (1.68Kb) |
|
1 Comment |
|
  |
|
|
  |
Author: Mumia W. (reading news)Mumia W. (reading news)
Date: Oct 1, 2006 08:12
On 10/01/2006 06:02 AM, Paul Lalli wrote:
> Vedran wrote:
>> Paul Lalli wrote:
>>> That is a flat-out lie. These scripts are NOT complete. They do not
>>> run on their own.
They probably do run in the OP's environment.
>> Of course, this is, as I mentioned in the subject of the first post, an
>> xchat perl script, you must run them from xchat to get it work :)
>
> I have no idea what "xchat" is, nor do I care. This is a Perl
> newsgroup. Post a SHORT but COMPLETE *Perl* scirpt which demonstrates
> your error. Pare your script down to the shortest possible script
> which still gives you an error. This should be a standard step you
> take in ANY attempt at debugging.
>
> Paul Lalli
>
|
| Show full article (1.68Kb) |
|
no comments
|
|
|
|
|
|
|