Shlomi Fish wrote:
On Thursday 19 Nov 2009 16:54:00 gaochong wrote:
Now I have see the following page ,but I have some question and need help .

http://www.cpan.org/authors/id/S/SU/SUJAI/Process-Detail-0.1.pl


the second , @array=split(/([A-Z]+(_|[A-Z])+\=.[^A-Z]+)/,$_); also the re \=.[^A-Z]+ what’s it ?

\= is an actual "=". A "=" would be fine here, too. "." is any character except a newline. "[^A-Z]" is any character except the uppercase Latin ASCII letters ("A", "B", "C"..."Z"). "+" is "one or more" when applied to the suffix. You can see signs of "ancient perl" in this expression, because it uses several capturing parentheses ("(...)") instead of clustering ones ("(?:...)").

Capturing parentheses in a split() regular expression returns the contents of the capturing parentheses as well as the strings that didn't match the regular expression so using non-capturing parentheses would do something completely different.

That being said, I agree wholeheartedly that this is one crappy Perl program and should be avoided.




John
--
The programmer is fighting against the two most
destructive forces in the universe: entropy and
human stupidity.               -- Damian Conway

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to