Mauto: I agree with [ RedRum ] - it is a really good idea to check whether the file was actually deleted or the function call has failed...

RedRum: In my first post in this thread I've offered two solutions and one of them used the return value of the unlink() to determine the outcome. Afterwards I've noticed that the thread author chose the solution without error control, thus the last solution Jean SpectorSQA Engineer @ Exanetjean.spector@softhome.net

There are only 10 types of people in the world - Those who understand binary, and those who don't.

1. Ignore the first line of the file no matter what - just put the <FILE>; line right after open() call (not very nice, but it does what you need)

2. Ignore ALL lines that begin with the pound sign ('#') - add the next if $file =~ /^\s*#/; as a first line of the while block (much nicer solution) and allows for additional comments. Of course you will have to begin all your comment lines (including the first one) with the pound sign... Jean SpectorSQA Engineer @ Exanetjean.spector@softhome.net

There are only 10 types of people in the world - Those who understand binary, and those who don't.

$variable =~ /regex/ means regular expression match (regex is the regular expression itself). The line checks whether the regex matches the contents of the $variable.

Now to the regex: ^ - in the beginning of the regex means the beginning of the line \s - means whitespace (space, tab etc.) * - means any number of characters of the previous kind (in our case any number of whitespace - including zero) # - means #

In other words we match the pound sign in the beginning of the line optionally preceded by any number of whitespace...

If it's not enough, you can look for the regex explanation in the FAQ and there is a regex explanation generator written (if I remember correctly) by [ japhy ] Jean SpectorSQA Engineer @ Exanetjean.spector@softhome.net

There are only 10 types of people in the world - Those who understand binary, and those who don't.

I found site: http://www.codebits.com/p5be/ to be very useful. Printed almost whole tutorial there, 400 pages or so. Scroll down and look for "chapters" at the left side. Dunno if its the best, but for a beginner like me it'll be enough for a long time. - Just another beginner -