#!/usr/bin/perl -w sub func { my $CmdSep = ($^O =~ m/MSWin32/ig)? "\&" : "\;"; print "The Command Seperator is: " . $CmdSep ."\n"; } func(); func();