Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: TIMTOWTDI meets Rube Goldberg

by eyepopslikeamosquito (Archbishop)
on Aug 07, 2011 at 01:36 UTC ( [id://919016]=note: print w/replies, xml ) Need Help??


in reply to TIMTOWTDI meets Rube Goldberg

Though I've seen a lot of horrific Perl code, I can't remember any amusingly horrific Perl code right now. However, I was tickled the other day by this piece of Unix shell:

#!/bin/sh # ... some_number=42 # ... if [ $some_number > 1 ] ...
Presumably the intent was to check if $some_number is greater than one. What it actually did was create a file called "1" in the current working directory as a side effect of the test always passing! I was wondering where on earth the file called "1" in my current working directory was coming from. When I finally found the offending snippet above, I asked the perpetrator how he tested his script and was met with an embarrassed silence. He could see the funny side of it though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://919016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found