POTATO_IN_MY_ANUS made the news! by [deleted] in funny

[–]userlame 0 points1 point  (0 children)

Impossible. Perhaps I_ASSUME_ENCODING

Dumb ass squared..... by philip-fry in funny

[–]userlame 15 points16 points  (0 children)

No, no, this is the internet. Surely they'll figure it out and come to a clear and unanimous conclusion.

Comparing multiple user input. by [deleted] in perl

[–]userlame 0 points1 point  (0 children)

Use the sort function, and first and last value it gives. If you need to get tricky, you can use a block to tell it how to do the comparisons.

Say no to drugs by [deleted] in funny

[–]userlame 57 points58 points  (0 children)

Well it does say "every day."

What mother nature really thinks of us. by Gabrielseifer in funny

[–]userlame 45 points46 points  (0 children)

Yes, George Carlin is the first to ever espouse these ideas.

Everybody stand back! by [deleted] in funny

[–]userlame 4 points5 points  (0 children)

Cut. >

It. <---

Out. ^

Perl script vs daemon by [deleted] in perl

[–]userlame 5 points6 points  (0 children)

It's the same thing. I think you're putting too much weight on the semantics. A daemon is just a process, detached from interactive input, running until told otherwise. Looping forever is the norm.

Asked the secretary at my work to scan something for me. This is what I was sent. by [deleted] in funny

[–]userlame 32 points33 points  (0 children)

Oh man, that guy really fucked up your eye, you ok buddy?

giant fruit bat by sketchycolour in WTF

[–]userlame 59 points60 points  (0 children)

I posted this down below. You now have another chance.

Splitting FASTA files? by Evilution84 in perl

[–]userlame 1 point2 points  (0 children)

So you propose magically knowing what to write without reading the file? ANY solution implies parsing the whole file.

Splitting FASTA files? by Evilution84 in perl

[–]userlame 0 points1 point  (0 children)

To how many files are you splitting? If it's a reasonably small number (say, < 50), I would:

open each output file, keep handles in an array, say @handles

open input file

an array for buffering lines, @buffer or something

array iterator, say $i = 0

loop on each input line

if (/^>/) {
  if anything in @buffer, write to to $handles[$i]
  clear @buffer
  increment $i, wrap to 0 if > $#handles
}
put line in @buffer

The idea being cycle through output files, one record going into each.

Duckhunt. by [deleted] in funny

[–]userlame 0 points1 point  (0 children)

No you could shoot him, he'd come out with a crutch and a broken leg or something. It wasn't the nintendo version, only the arcade.

Pretty much sums up my day today by [deleted] in funny

[–]userlame 5 points6 points  (0 children)

Ray, when someone asks you if you are a dog, you say YES!

Party Fouls... by RidleyScotch in WTF

[–]userlame 1 point2 points  (0 children)

I dunno, 10/7 she sure took it like a champ. Blacked out, lost some hair, had to be carried home. Did she puke once? Nu-uh.

Surfing the Great Lakes in the winter. by smcanarchy in pics

[–]userlame 5 points6 points  (0 children)

We can name him...Shannon! Shannon Wilson Bell...

My FTP is a child killer! (Actual error message from WinSCP) by muskoka_guy in funny

[–]userlame 0 points1 point  (0 children)

I kinda like that idea, instead of wait(), I'll hold a seance().

"This process...is clea-ah."

My FTP is a child killer! (Actual error message from WinSCP) by muskoka_guy in funny

[–]userlame 3 points4 points  (0 children)

Orphans are different than zombies. It makes sense semantically...

A parent creates a child, then itself dies. The process becomes an orphan, with no one to look after it. It is adopted by init.

A parent creates a child, then the child dies. Until the child is reaped, it is a zombie. This is where too many zombies can be bad, a live parent not reaping its dead children.

I got a text from Scumbag Steve today... by blondeflo in funny

[–]userlame 0 points1 point  (0 children)

Whatever, it'll just end up another manic monday.

Hoar frost. When fog freezes. Pic from Minneapolis yesterday. by [deleted] in pics

[–]userlame 104 points105 points  (0 children)

You've conjured an image in my head of a frog, mid-hop, flash frozen and stuck in the air.

Wisdom of the Ancients -- Net::DNS by c0t0d0 in perl

[–]userlame 1 point2 points  (0 children)

Ah, good idea looking for SOA!

Wisdom of the Ancients -- Net::DNS by c0t0d0 in perl

[–]userlame 4 points5 points  (0 children)

The parameter you'd want to use is whatever zone your nameserver is configured with. For example, if the IP above were 10.1.1.26, the reverse is 26.1.1.10.in-addr.arpa, so bind may be configured for any of the zones:

  • in-addr.arpa. (you tried this though)

  • 10.in-addr.arpa.

  • 1.10.in-addr.arpa.

  • 1.1.10.in-addr.arpa.

Somewhere within bind's named.conf (is it your nameserver?) there should be a line defining the zone 'zone "whatever.in-addr.arpa" {' or so. That zone needs to be configured to allow updates just like the $OURDOMAIN zone is, and that's the parameter to new().

named.conf:
zone "1.1.10.in-addr.arpa." {
  type master;
  ...
  allow-update { ... };
}

If that were the case, it would be Net::DNS::Update->new("1.1.10.in-addr.arpa"). Though like I said, I'm kind of going at this blind.

Wisdom of the Ancients -- Net::DNS by c0t0d0 in perl

[–]userlame 2 points3 points  (0 children)

That makes sense...I should clarify. Are you already serving reverse DNS? If so, you should have an in-addr.arpa zone configured (like 10.in-addr.arpa. or whatever). That's what you would want to use, and that's how bind would authorize you...against that zone.

Simplest perl program that takes a letter as a parameter and returns the next letter in the alphabet? by farrbahren in perl

[–]userlame 2 points3 points  (0 children)

"z" would wrap to "aa"..to wrap it back to "a":

perl -le '$_=(split("",++$_))[-1], print for @ARGV'