I'm attempting to write a patch for a module that I feel I can use within one of my own modules, and I've run into something that I can't solve (I can't come up with the proper query in Google).
Perhaps code will help here. First, I know 'word' does not include whitespace, and I know that one should not include prototypes in a Perl function. I'm trying to follow the flow of the original developer. In the third line of the following code, I want the replacement pattern to be (whitespace * $_[1]). I'll deal with the undef issue after I figure out how to use {$num} on essentially nothing. I haven't been able to make it work with the likes of s/blah/\s{3}/g; etc: sub to_word ($;$) { return unless defined $_[0] && $_[0] ne ''; my $word = $_[0] =~ s/[^\w\s]/\s{3}/g; return unless defined $word; } Steve
smime.p7s
Description: S/MIME Cryptographic Signature