Faster perl operation?
Kevin Brown
kevin_brown at qwest.net
Wed Jan 17 19:34:47 MST 2007
I'm working on a small script (so far only about 1000 lines long) and
I'm finding that I'd like a faster way to do:
$variable = "." x ($start - 1);
which is incredibly slow since it is creating sometimes on the order of
100,000 to 3,000,000 (yes, Million) periods to fill up the needed string.
I've tried using:
sprintf +("%s" x ($start - 1)), ".";
but I must not have the syntax correct as it doesn't create the needed
"." characters.
Any thoughts on what is wrong with the sprintf syntax or what else I
could try to speed this up?
More information about the PLUG-discuss
mailing list