in reply to flip flop behaviour of regex match
... sub func { print 'The Command Seperator is: ', $^O =~ /MSWin32/i ? '&' : ';', " +\n" } func(); func(); ...
which evaluates the regex in scalar context as 0/1 (array index of the qw...)sub func { print 'The Command Seperator is: ', qw(; &)[ $^O =~ /MSWin32/i ], "\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: flip flop behaviour of regex match
by harsha.reddy (Acolyte) on Oct 10, 2007 at 14:54 UTC |