Update: I ended up solving this after asking in CB, and while I was typing these words in. It is an RTFM problem. I thought it would be good to post, since it may help others find the solution faster in the future.

I'm using POE to read from a socket when something is available, then do a bunch of stuff with it. I'm using select_read() to tell me if something is available on the socket. This call is documented in POE::Kernel as follows:

# Watch for read readiness on a filehandle. $kernel->select_read( $file_handle, $event, @optional_args );
I would like to use the optional arguments to communicate with my event handler. To do this, I created the following line in my event handler:
($k, $sock, $optarg1) = @_[KERNEL, ARG0, ARG1];
I was expecting $optarg1 to be the first optional argument that I set in the select_read call. Instead, it always seemed to be set to zero. I searched a bunch, but didn't find anything, then asked in the CB for some help. I had to run before anyone had time to help me out, so I thought I'd post the question here.

While getting my references setup for this article, I stumbled across the solution in POE::Kernel:

Select events include two parameters. ARG0 holds the handle of the file that is ready. ARG1 contains 0, 1, or 2 to indicate whether the filehandle is ready f +or reading, writing, or out-of-band reading (otherwise knows as "expe +dited" or "exception"). ARG2..$#_ contain optional additional parameters passed to POE::Kernel +'s various I/O watcher methods.
D'oh! As you can see, my problem is solved by the following:
($k, $sock, $status, $optarg1) = @_[KERNEL, ARG0, ARG1, ARG2];
Thanks to all who tried to help out in CB. I hope this helps others who walk down the same path I did.

-Craig