| Zapelius | hi |
| merlyn | hi what is gp2x? |
| Zapelius | merlyn, it's a game console |
| damog | how to work with buffering? I mean, in some other situations, what would be a good workaround? |
| f00li5h | damog: can you disable it? |
| merlyn | I start nearly every CGI script with $| = 1; it's hardly harmful, and almost always helpful |
| crunge | I just won't use system like that |
| simcop2387-tv | GumbyBRAIN, she goes 300 hectares on a single tank of kerosene |
| GumbyBRAIN | While i was missing quotes between my statement and my \n and that sort of in the tank would probably would have a drink problem! |
| merlyn | like what? |
| Zapelius | my program communicates with an usb device. I can read it's status from /proc, and when something bad happens, I do re-open the filehandles that I read/write on /dev/.. |
| crunge | I thought a hectare was a unit of area |
| merlyn | s/it's/its/ |
| Zapelius | for some reason since some point, when I re-open them, I can't write to those handles anymore. reading works fine. |
| pasteling | "fduplex" at 74.100.107.108 pasted "why does sub foobar return a value on the first call but not afterward?" (15 lines, 225B) at http://sial.org/pbot/23323 |
| Zapelius | like: if ($error) { close_bus(); sleep 0.2; open_bus(); } .... sub close_bus { close $tx_fh; close rx_fh; } ... sub open_bus { open $tx_fh, ">/dev/blah" or warn "bla bla"; .... } |
| imMute | fduplex: wow, there are so many things wrong with that code |
| Zapelius | I don't get any error when reopening and the initial open is done via the same function and that works |
| fduplex | imMute: well it was meant as an example of what i'm trying to do.. the example doesn't do anything meaningful |
| imMute | neither does that code |
| f00li5h | Zapeliu |
| fduplex | imMute: shouldn't it take the argument given to the subroutine, capture it's whole contents back to $var and return it? |
| imMute | no the arguments to a sub are in @_ |
| f00li5h | Zapelius: sleep only does integers (unless you've imported something) |
| imMute | thats #1 #2 - never use & to call a sub |
| Aankhen`` | How can I get a slice of a hashref? |
| Zapelius | f00li5h, I have Time::HiRes |
| f00li5h | Zapelius: neat |
| imMute | Aankhen``: @{ $hashref }{'key1','key2'} |
| f00li5h | Aankhen``: dereference it first |
| Aankhen`` | imMute: Ah, thanks. Bloody nick completion. Thanks f00li5h, too. :-) |
| f00li5h | sure |
| imMute | fduplex: 3) you change $_, but return $var and then print $var which has no meaningful value |
| Aankhen`` | Right, now I get "Not an ARRAY reference". |