Hi,
: For example I've got something like this:
:
: $users = `users`
: ;
: # command users show actually logged users in system, for example
: # now show us this:
: # jgr root root jgr greg n0c
:
: @data = split (/ /, $users);
:
: # so in @data i've got: "jgr", "root", "root", "jgr", "greg", "n0c"
:
: eh, end now, how can I count how many each elemenets is in @data, I
: mean, for example how many "jgr", is in @data ?
: But contents of @data is not always the same.
print scalar(@data); # Will print number of elements
print $#data; # Will print the highest array index.
Basically, an array evaluated in scalar context will show the number of elements in the array.
: Sorry for my poor english :))
No worries, I understood.
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");