Ok,
I have tested with DBI and it works great.
Anyway, I have checked with the mysql command "show full processlist;" what is doing the server when it hangs on with Net::MySQL, and this is the result:
mysql> show full processlist; +----+-------+-----------+--------+---------+------+-------+---------- +-------------+ | Id | User | Host | db | Command | Time | State | Info + | +----+-------+-----------+--------+---------+------+-------+---------- +-------------+ | 56 | root | localhost | NULL | Query | 0 | NULL | show full + processlist | | 57 | mysql | localhost | Weblib | Sleep | 137 | | NULL + | +----+-------+-----------+--------+---------+------+-------+---------- +-------------+

Also, when running a "truss" command on UNIX, it says something similar:
send(4, 0x081B6F68, 46, 0) = 46 *\0\0\003 S E L E C T * F R O M U s e r s W H E R E C S L = ' h s a n c h e ' recvfrom(4, 0x081B70B0, 1460, 0, 0x08047530, 0x0804796C) = 144 01\0\00102 ,\0\00203 d e f06 W e b l i b05 U s e r s05 U s e r s 03 C S L03 C S L\f !\018\0\0\0FD\0\0\0\0\0 6\0\00303 d e f06 W e b l i b05 U s e r s05 U s e r s\b L a n g C o d e\b L a n g C o d e\f !\006\0\0\0FE\0\0\0\0\005\0\004FE\0\002\0\v\0\00507 h s a n c h e02 e s05\0\006FE\0\002\0 recvfrom(4, 0x081F7520, 1460, 0, 0x08047530, 0x0804796C) (sleeping...)

I don't know why is so lazy this process and want to sleep always! :)
So, I'm going to use the script with DBI
Thanks to you 2 for your advice, guys

In reply to Re^3: MySQL doesn't work with perl by srfrogster
in thread MySQL doesn't work with perl by srfrogster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.