in reply to reg-exp problem

As others have pointed out, perlre or perlretut are recommended reading, because this is a very important and basic construct in regular expressions.

In a regex, [] surround a "character class", meaning that it matches any of the characters inside the square brackets.

Since split divides a string based on its delimiter regex, in this case, your input string is being split on any of the { } , * characters.

$ $ perl -e'print "$_\n" foreach split /[,{}*]/,"this{is*a}test,of"' this is a test of

Mike

Replies are listed 'Best First'.
Re^2: reg-exp problem
by perlplayer (Sexton) on Sep 09, 2008 at 11:42 UTC
    thanks to all, i will go through the documentation