neidu

joined 3 years ago
[โ€“] neidu@feddit.nl 0 points 2 years ago* (last edited 2 years ago) (4 children)

After working in IT since 1999, I can count on my dads lefthand fingers the times I've had to solder a graphics card.

PS: My dad lost his left arm in 1996

[โ€“] neidu@feddit.nl 0 points 2 years ago* (last edited 2 years ago) (3 children)

My solution in perl back in the day when I was a teenage hobbyist who didn't know about the modulus operator: Divide by 2 and use regex to check for a decimal point.

if ($num / 2 =~ /\./) { return "odd" }
else { return "even" }