<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font face="Helvetica, Arial,
sans-serif">That's extremely strange behavior.<br>
</font><br>
<font face="Helvetica, Arial, sans-serif">If I were you I'd try
the following:</font><br>
<blockquote><tt>use List::Util qw( shuffle );</tt><tt><br>
</tt><tt><br>
</tt><tt>my $p = </tt><tt>( shuffle @phrases )[0];</tt><tt><br>
</tt></blockquote>
<br>
<font face="Helvetica, Arial, sans-serif">You could also try a
workaround such as the line below, just to see what happens, but
I would prefer the above.</font><br>
<blockquote><tt>my $i = eval 'int( rand( scalar @nodes ) )';</tt><tt><br>
</tt></blockquote>
<font face="Helvetica, Arial, sans-serif"><br>
--Tommy Butler</font><br>
<br>
On 11/14/2013 06:09 PM, John Dexter wrote:<br>
</div>
<blockquote
cite="mid:CACtE9a32rccD-9YXiyL_NL9SHz5v3TxS-HsvUy2f6SCS9-zW6w@mail.gmail.com"
type="cite">
<div dir="ltr">So, I've been a long time lurker on the DFW.pm
mailing list and decided to go ahead and get active by attending
last night's meeting. Of course, at the last minute I got
saddled with an emergency database restore for work, so I was
unable to attend.
<div>
<br>
</div>
<div>I did want to join in on the IRC bot fun, so I whipped up a
little plugin of my own, that I call "Discuss". Hate sitting
in a dead IRC channel? This will let you ask the bot for
discussion topics based on blog posts at <a
moz-do-not-send="true" href="http://blogs.perl.org">blogs.perl.org</a>.</div>
<div><br>
</div>
<div>I'm running into an issue though. I'm using the rand()
function to let the bot pick random posts and random return
phrases, but it doesn't seem to be changing after the initial
request. My guess is that this is an issue with POE and the
rand numbers are only generated once at compile time, so
subsequent calls to the subroutine do not produce different
results. Anyone know how to get around that? Or if that is
even the issue?</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://github.com/PsyDefect/dfwbot/blob/master/DFWpm/BotPlugin/Discuss.pm">https://github.com/PsyDefect/dfwbot/blob/master/DFWpm/BotPlugin/Discuss.pm</a><br>
</div>
</div>
<div class="gmail_extra">
<br clear="all">
<div>Sincerely,<br>
<br>
John Dexter<br>
</div>
<br>
<br>
<div class="gmail_quote">On Tue, Nov 12, 2013 at 7:29 PM, Coyo <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:coyo@darkdna.net" target="_blank">coyo@darkdna.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> I can't believe it's
my birthday already.<br>
<br>
I feel so oooooooooooooold.<br>
<br>
My birthday is tomorrow, the 13th. A hump day.<br>
<br>
I hope that's an omen.
<div class="im"><br>
<div><br>
<br>
On 11/12/2013 04:42 PM, John Fields wrote:<br>
</div>
<blockquote type="cite">
<p dir="ltr">2nd Wed is huuuummmpppddaaaayyy. :)</p>
<p dir="ltr">We will be running some home made bots
and covering different ways to run them under
Linux. Maybe add a stats page, or a tabulated log
of results? Bring your ideas and "what ifs".</p>
<p dir="ltr">As usual it is at the <a
moz-do-not-send="true"
href="http://dallasmakerspace.org" target="_blank">dallasmakerspace.org</a>
at 7pm. Some food afterwards at a local eatery.<br>
</p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>