I didn't quite get what your problem was.
Can you elaborate on that?
There are a couple of newbie problems in your script:
<snip>
> ##################################################################
> #!/usr/bin/perl
You should say:
!/usr/bin/perl -w
This turns on warnings (which is very helpfull)
You should also say
use strict;
Than you have to declare all variables with 'my'. This helps
enormously with typos.
>
> for ($i=0;$i<20;$i++) {
> @zin[$i] = $ARGV[$i];
> print "@zin[$i] \n\r";
> }
You can copy an array much easier:
my @zin = @ARGV;
>
> #print "@zin";
> #$_ = $zin;
> # $zin = $ARGV;
>
> print "$zin";
$zin is a new variable to perl. @zin is a totally seperate thing.
"use struct" would have argued with you about that ;-)
>
> $ta = @zin[6];
> $tb = @zin[7];
> $tc = @zin[8];
> $td = @zin[9];
you only access the whole array by saying @arrayname. If you want to
access just one array-entry you say $arrayname[index]. I remember this
by thinking: $ is to acces a scalar. Elements of arrays are scalars.
So I use $ to acces the elemnt of an array.
>
> for ($t=0;$t<20;$t++) {
>
> if (@zin[$t] = /212.104.202.50/g) {
> $name = "NS1.NETCASE.NL";
> $email = '[EMAIL PROTECTED]';
> $bericht ="Hoi wij krijgen de melding $ta $tb $tc $td van $name, kunnen
>jullie hier iets aan doen?";
> }
Here is the same problem with @zin. You want to say $zin[$t].
What you do here is assigning a regular expression to variable.
This is not what you want. You want to _match_ the regex against
the contents of a variable. You have to use the =~ operator to do that.
In the regex . is a special character meaning "any character". If
you want a literal dot (like in your IP) you have to backslash it
(\. instead of .).
correct line:
if ($zin[$t] =~ /212\.104\.202\.50/) {
You can leave out the g. It means global matching which does nothing in
this context.
You should correct the rest accordingly.
<snip>
If you need further help,
feel free to ask again,
cr