harsha.reddy has asked for the wisdom of the Perl Monks concerning the following question:
The output of this snippet is strange:#!/usr/bin/perl -w sub func { my $CmdSep = ($^O =~ m/MSWin32/ig)? "\&" : "\;"; print "The Command Seperator is: " . $CmdSep ."\n"; } func(); func();
Tested using: This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 50 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 820 274739 provided by ActiveState http://www.ActiveState.com Built Jan 23 2007 15:57:46
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: flip flop behaviour of regex match
by ikegami (Patriarch) on Oct 10, 2007 at 14:15 UTC | |
|
Re: flip flop behaviour of regex match
by mwah (Hermit) on Oct 10, 2007 at 14:36 UTC | |
by harsha.reddy (Acolyte) on Oct 10, 2007 at 14:54 UTC |