Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows or Linux? 1

Status
Not open for further replies.

rpack78

Programmer
Oct 1, 2004
35
US
Can someone tell me a good way for my perl script to know if it is running on a Windows box or a Linux box? I want to do different commands if it is running on Windows. Thanks.

Ryan
 
The special $^0 variable tells you what OS you're on. See perlvar for more details if you need to distinguish between Windows versions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top