Lograh (lograh) wrote,
Lograh
lograh

it's times like this // life

it's been forever and a day since I've actually typed up something resembling code. I had forgotten how much fun it can be, to take an idea, identify the tasks that idea encompases, and create a solution to those tasks.

That, and I had forgotten just how precise you have to be! heh..

props to macklinr's 1337 perl skillz for helping me see the (in retrospect, painfully obvious) error in my code.

still, you get moments when you look at the finished code, and see it fly through the tasks like a hot knife through butter, and just admire the compactness and efficiency of typing that accomplishes that.. It's almost poetic, in a way..

if($line =~ /\Q$_\E+\s*([^\r\n]*)/){print "$1,";}

Such a simple line, yet it drives the script that will take a directory full of data dumps and output a file in proper csv format (well, okay, with the exception of an extra comma at the end of each line, but that's easilly ignored) for importing to any spreadsheet program where we can then get an idea for the state of computing in our college. Now all I have to do is write a dos batch file that the users can run from their email to have their machines generate the data files for me (because it's a bitch to run around to each individual computer when you've got a few hundred to do).

For the record, this was my first perl program ever. Yes, I had somehow manged to make it this far in life without learning perl.
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments