in reply to Re^2: PLEADE HELP ME!![NEWBIE]
in thread PLEADE HELP ME!![NEWBIE]

s/$/, /;
"$" is the end of the string, so you are "substituting" ", " for the end of the string (i.e. appending ", " to the string). Which would be just as well (or better) written as:
$_ .= ", ";
Then:
my$x=()=/,/g;
First, /,/g will return an array of commas in array context. The "()" provides the array context. The my $x = gets the array in scalar context, which is the number of elements in the array. Since the regex consists of only one character, this could also be written (IMO) more simply as:
my $x = tr/,//;