> and here is the optimized version of Geoff's one:
>
> sub shell_ready_stas {
> my $arg = shift;
> $arg =~ s!\\?"!\\"!g;
> return qq["$arg"];
> }
>
> :)
Benchmark: timing 1000000 iterations of geoff, stas...
geoff: 64 wallclock secs (56.35 usr + 0.10 sys = 56.45 CPU) @
17714.79/s (n=1000000)
stas: 43 wallclock secs (40.27 usr + 0.06 sys = 40.33 CPU) @
24795.44/s (n=1000000)
/me bows to the master
--Geoff
