topher

So today I got my very first perl tutorial. Ed The Great wrote a simple script and then walked me through it until I understood it.

It tags one argument and then writes that argument to a file and then runs an external program to upload that file to a given location. For my use, xmms has a default plugin that will run a given script on song change, passing the song title to that script. So my script grabs the song title, writes it to a file, then uploads it to my website. Then I use php to just include it in my sidebar. You can see it on the right there, under my desktop screenshot.

I then wrote another one with writes some default text to that file, and the same xmms plugin can run a different script on playlist end.

So, here are the scripts:

current_template.txt
empty_template.txt

Thus begins the great learning path on perl. He also wrote it for me in python, and it was actually a lot easier to understand, so I may follow that path as well. We’ll see.

One thought on “perl before swine

Leave a Reply

Your email address will not be published. Required fields are marked *