[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[long] Re: [MacPerl] Recommendations on how to port a MacPerl (fwd)



According to Alex Satrapa:
> 
> Check what operating system your script is running under:
> 
> 	use English;
> 	if( $OSNAME="MacOS" )
> 	{
> 		<do something MacOS specific>
> 	};
> 

One correction here.  The above should be:

	if( $OSNAME == "MacOS" )

The one given by Satrapa would make $OSNAME equal "MacOS".
Also, according to the Perl book, even this is not
correct.  It should be:

	if( $OSNAME eq "MacOS" )

since it is a string variable and not a number.  However, I
do believe that Perl will correct the above on it's own.
It's just that it takes a bit more overhead (ie: time) for
Perl to figure it out.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch