in reply to problem in a small script

Welcome massoo.

I've got a couple of suggestions.

  1. It's good practice to add the following lines to the start of your code:
    use strict; use warnings; # <- this is the same as using the -w in the #! line use diagnostics;
  2. Find out the difference between ' ' (single quotes) and ` ` (backtics).

    Single quotes are related to strings.

    Backtics are related to system() and exec().

  3. There was a couple of times in your post I was not sure if you meant "no" as in "no." short for number; or if you meant "no" like another way of saying "false".

Cheers,

Brent

-- Yeah, I'm a Delt.