Re: count of matches
You can also use this bizarre construction to capture just the count: $_ = ABabcde12345BAABabcde1234blahblah5BA; $count = () = $_=~ /(AB.*?BA)/g; print I matched $count times\n' the () between the two ='s forces the match to list context, and then THAT is forced to scalar context by setting it to $count. Whee! ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: black box
If you're using ActiveState Perl, an easy was is to use the wperl executable instead of the perl executable to run your scripts. Scripts you want to run w/o the dos box could have a .wpl extension instead of .pl, and you could associate .wpl with wperl. --Kester Allen On Wed, 15 Dec 2004 13:38:01 -0600, Lasher, Brian [EMAIL PROTECTED] wrote: Is there any way to keep the black command-prompt looking box from popping up when executing perl script on win 32 platform? -brian Brian Lasher Catalog DSP Product Engineering Best Practices and Yield Enhancement Team [EMAIL PROTECTED] 281-274-2913(W) 281-684-4699(C) 713-664-6240(H) 281-274-2279(F) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: RegEx help
There's a fun little idiom using tr/// to count the number of occurances of a character in a string: perl -le '$str = a,b,c,d,e; $count = ($str =~ tr/,/,/); print $count' will output 4, the number of commas in a,b,c,d,e. --Kester Jeff Williams wrote, on Tue 12/14/2004 11:23 : I wrote a RegEx to let me know if a line of text has exactly 36 commas in it (the comma is the separator) and I came up with this. I don't think it is quite right. I could use a little pointing in the right direction. Any thoughts? : $lines[0] =~/^(.*?,){36}.*?$/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
installing PGPLOT.pm on win32
Grettings, All-- Has anyone successfully installed the PGPLOT.pm module on a win32 box? I have tried numerous methods, including trying to compile it myself. It seems to be beyond my current abilities-- if anyone could take pity on me and point me to a working install method, I'd be much obliged. Thank you, Kester Allen ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs