- Prison Code Breaker Diary -

=> aka: Nhật Kí Code Tù

Categories

This is a quick trick to identify which operating system you are on:

#!/usr/bin/perl -v
print "The current operating system is: " . $^O;


The built-in variable $^O holds the value:
+ if you are under Windows: "MSWin32" or "Win32"
+ if you are under Linux: "linux"

Have fun!@

0 comments

Post a Comment