D
Dr.Ruud
Mirco Wahab schreef:
Well, the output-data is already in $_ (just not expanded).
So it depends on whether the exact format is in the specs.
If so, what is the most efficient way to transform the
literal string '12345' into '1 -> 1234 -> 5'?
Yes, such exercises are nice to be involved in.
Dr.Ruud:
Bt you have than at least to invoke
the regex, in order to provide the data:
for my $i ( 0 .. $n ) {
$_ = substr( $G_input_data, $i, $w );
/$R/ and 1;
# out: /$R/ and print " $2 -> $1 -> $3 \n" ;
}
which makes it slow again.
Well, the output-data is already in $_ (just not expanded).
So it depends on whether the exact format is in the specs.
If so, what is the most efficient way to transform the
literal string '12345' into '1 -> 1234 -> 5'?
PS. I like this discussion very much
and learned a lot from it.
(Thanks to all involved!)
Yes, such exercises are nice to be involved in.