#perl - Wed 7 Mar 2007 between 00:12 and 00:24



Zapeliushi
merlynhi
what is gp2x?
Zapeliusmerlyn, it's a game console
damoghow to work with buffering? I mean, in some other situations, what would be a good workaround?
f00li5hdamog: can you disable it?
merlynI start nearly every CGI script with $| = 1;
it's hardly harmful, and almost always helpful
crungeI just won't use system like that
simcop2387-tvGumbyBRAIN, she goes 300 hectares on a single tank of kerosene
GumbyBRAINWhile i was missing quotes between my statement and my \n and that sort of in the tank would probably would have a drink problem!
merlynlike what?
Zapeliusmy 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/..
crungeI thought a hectare was a unit of area
merlyns/it's/its/
Zapeliusfor 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
Zapeliuslike: 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"; .... }
imMutefduplex: wow, there are so many things wrong with that code
ZapeliusI don't get any error when reopening and the initial open is done via the same function and that works
fdupleximMute: well it was meant as an example of what i'm trying to do.. the example doesn't do anything meaningful
imMuteneither does that code
f00li5hZapeliu
fdupleximMute: shouldn't it take the argument given to the subroutine, capture it's whole contents back to $var and return it?
imMuteno
the arguments to a sub are in @_
f00li5hZapelius: sleep only does integers (unless you've imported something)
imMutethats #1
#2 - never use & to call a sub
Aankhen``How can I get a slice of a hashref?
Zapeliusf00li5h, I have Time::HiRes
f00li5hZapelius: neat
imMuteAankhen``: @{ $hashref }{'key1','key2'}
f00li5hAankhen``: dereference it first
Aankhen``imMute: Ah, thanks.
Bloody nick completion.
Thanks f00li5h, too. :-)
f00li5hsure
imMutefduplex: 3) you change $_, but return $var and then print $var which has no meaningful value
Aankhen``Right, now I get "Not an ARRAY reference".

Page: 3 10 17 24 31 38 45 52 59 66 73 80 

IrcArchive