Main

perl Archives

December 7, 2001

perl over sed

very useful way of using perl as a replacement for sed when sed just doesn't cut it - eg
cat blah | perl -p -i -e 's/foo/bar/g'
perl -pe 's/,/-/; s/,/ /; s/,/ /; s/,/ /; s/,/./g;' infile > outfile

May 21, 2002

IIS hacked

My other computer is your IIS server.

July 26, 2002

which modules installed

find out what perl modules you have installed locally:
$ perldoc perllocal

which modules installed

find out what perl modules you have installed locally:
$ perldoc perllocal

August 23, 2002

regexp return only match

useful command line perl for doing a grep but only returning the matched string, not the whole line:

cat filename | perl -ne 'if($_ =~ /regexpr/) { print('$&
');}'

can't help thinking you should be able to do this with grep...

October 16, 2002

Mailer on War on Terrorism

Norman Mailer on the 'War on terrorism' and Iraq :
Part I
Part II

November 2, 2002

mkdir umask

Perl's mkdir function is a bit odd if you expect the mask parameter to apply permissions directly. this is a good explanation of it, and make sure you do NOT put quotes around the mask, otherwise it behaves even more weirdly.

August 18, 2003

Wal-Mart

Chilling article in the Guardian about Wal-Mart and how corporate America is taking over not only small towns but also what people read and listen to. This is sick.

August 25, 2003

Currently reading Learning Perl. Although

Currently reading Learning Perl. Although I've taught myself most of the basics in the last year or two, there is still a lot in there that fills gaps, and it's good to have things explained properly. And the best bit is finding out little nuggets like for instance the very cool feature of being able to attach a DBM file to a hash with one line :

dbmopen(%somehash, "dbmfilename", 0644);

That's it. Seems to work without any extra modules either. Neat!

February 3, 2005

Hotel TVs

The televison in my hotel room is a typical weird hotel tv, not quite the same as a normal one, strange front end menu system. When you turn it off using the big button on the front, a message is displayed on a little LED panel to say 'OFF'. This stays until you turn it on again. My definition of off obviously isn't the same as Philips'.

Makes me think of a lot of PCs these days, their power buttons don't actually turn the power off, but mearly suggest to the machine that a shutdown has been requested. It seems then to be up to the PC to actually turn off if it wants. Of course what usually happens is that you're pressing the button because the machine has gotten itself into a state and is either too busy to field power off suggestions, or not in the mood, so it doesn't even work.

We're loosing control of the machines we're building! Of course there's always the power cable....

About perl

This page contains an archive of all entries posted to numbersix in the perl category. They are listed from oldest to newest.

people is the previous category.

phunny is the next category.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33