Ned Konz wrote: > # this is four times as fast as s/// solution > sub toutf > { > my $s = shift; > pack('v*', unpack('c*', $s)); > } Cool :-) Wouldn't have thought of that. > while (<>) > { > my $line = $_; > map { $line =~ s/$_/$subs{$_}/g } keys(%subs); Some people consider it bad style to use map in void context -- building up a return list and then throwing it away. You might consider, for example: $line =~ s/$_/$subs{$_}/g foreach keys %subs; as an alternative. > print $line; > } Cheers, Philip --- You are currently subscribed to perl-win32-users as: [archive@jab.org] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mailing List support, send email to [EMAIL PROTECTED]
- Finding and replacing a UNICODE string. kevin . burton
- Re: Finding and replacing a UNICODE string. Ned Konz
- RE: Finding and replacing a UNICODE string. kevin . burton
- RE: Finding and replacing a UNICODE string. kevin . burton
- Re: Finding and replacing a UNICODE string. Philip Newton
- Re: Finding and replacing a UNICODE string. Philip Newton
- RE: Finding and replacing a UNICODE string. kevin . burton
- Re: Finding and replacing a UNICODE string. Philip Newton
- RE: Finding and replacing a UNICODE string. Philip Newton
- RE: Finding and replacing a UNICODE string. kevin . burton
- RE: Finding and replacing a UNICODE string. kevin . burton
- Re: Finding and replacing a UNICODE string. Philip Newton
- RE: Finding and replacing a UNICODE string. Douglas Wilson
- Re: Finding and replacing a UNICODE string. Ned Konz
- RE: Finding and replacing a UNICODE string. Doug Wilson
- RE: Finding and replacing a UNICODE string. Doug Wilson