At 10:09 AM -0500 08/13/97, Mark Manning/Muniz Eng. wrote: >According to Brian L. Matthews: >> Warning! Biting Sarcasm and Harsh Words ahead. >*nod* as you have said - so do I. Me too. (No I'm not an AOL user. Never.) >> |> Those two aren't even syntactically equivalent: >> |> if($^O =~ /mac/i ) {} >> |Heh. Syntactically or not, if $^O contains "MacOS" then >> |both of the commands will return true. :-) >> >> Ah. The "it happens to do what I want in one particular case, so who >> cares if it's demonstrably wrong" argument. > >Ah. *BEEP* Wrong! But thanks for playing our game! Gee can you tell me what your game is? $^O =~ /mac/i match anything from 'mach', 'emacs' to 'ThisISANyThingButAmaCiNtosh' In fact standard perl support MachTen. Although I don't use MachTen, I'm pretty sure its $^O return "machten" or "machten_2" >Actually, if $^O contains "MacOS" AND if "=~" does a string >search for a particular string given the "/../" operator, >THEN > > if( $^O eq "MacOS" ) > > Which does a specific string compare versus the > > if( $^O =~ /mac/i ) > > Which looks for a particular string within the variable ^O > > Both of these IF statements will return true. > Further, it would seem kind of silly to me for Perl > (or MacPerl) to do the > > if( $^O eq "mac" ) > if( $^O eq "Mac" ) > . > . In that case, what you really wanted is $^O =~ /^macos$/i But that's plain wrong too!! I use $^O eq "MacOS" because "MaCoS", "mACOs" etc could be anything. I don't consider those variation Macintosh related at all. Cheers, Paul ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch