[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Syntax error question (newbie)



Hi All!
checking the sintax of this piece of script:

for ($i = 0;
     $i <= $#ID;
     $i++) {
  $prova =  @ID[$i];
  print ("$prova\n");
  foreach $x (0..$#ID) {
    if ($ID[$x] !~ /[$prova]/) {
      print ("$ID[$x]\n");

    }
  }
}

everything's OK.

but if I use:
for ($i = 0;
     $i <= $#ID;
     $i++) {
  $prova =  @ID[$i];
  print ("$prova\n");
  foreach $x (0..$#ID) {
    if ($ID[$x] !~ /[$prova]/) {
      print ("--- $ID[$x]\n");        #that's changed

    }
  }
}

I have:
# Can't open perl script "Voivod I:": No such file or directory.
Am I missing something obvious?

TIA

Giorgio

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org