Hi, I am currently analising the pre-written tool in perl. I stuck at a line which actually splits a string on some basis.Can someone explain me on what basis it is spliting a string.Attached is a piece od code contaning Split function.

split accepts a regular expression as first parameter. The second parameter contains the script to be splitted. $_ will be used when that value is not provided. not that some lines set $_ when to variable is used to assign the value to. (like while(<FILE>)

The regular expression is actually very simple. everything between [ and ] is a character class. In other words, one of those characters should match. That is: ASCII codes 1 to 6, a \b, \f, \n (newline), \r \e That's it.

See 'perlfaq6' and 'perlre' in the perldoc documentation for more information

[ ] are used for character classes. ie they match a range of characters eg... [a-z0-9] they also disable meta-characters. Putting a ^ at the beginning tells the regex not to match any of the characters....eg