This pattern match seems a little saner, and stops " for Win32"
getting picked up from the following output:
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Maybe it breaks older versions, but at least the latest now works
correctly. If anyone knows what older versions' messages look like
then speak up!
p4raw-id: //depot/perl@24855
}
elsif ($opt{cc} eq 'bcc32') {
my $output = `bcc32 --version 2>&1`;
- $opt{ccversion} = $output =~ /(\d+.*)/ ? $1 : '?';
- $opt{ccversion} =~ s/\s+copyright.*//i;
+ $opt{ccversion} = $output =~ /([\d.]+)/ ? $1 : '?';
}
elsif ($opt{cc} eq 'gcc') {
chomp($opt{gccversion} = `gcc -dumpversion`);