Rob,
Errr, I think I see this. Seems more elegant than a strict
search/replace. But, I don't understand this:
next unless $line =~ s/^units\s+=\s+//;
Substituting the left side with nothing? I must be reading this
wrong.
I do understand the split and join, though - I've used split
a lot, but not join. I appreciate you giving an example.
deb
At 23:47:28, on 07.09.03:
>
> Hi Deb.
>
> Here's the way I'd do it. First check that the line starts with
> 'units' - whitespace - '=' - whitespace and strip it off in one
> statement. Then you seem to be left with a number of emails
> which are separated by any of colon, semicolon or whitespace, so
> just split on a regex which says just that and rejoin the list with
> commas.
>
> foreach my $line (@lines) {
>
> next unless $line =~ s/^units\s+=\s+//;
>
> my @emails = split /[:;\s]+/, $line;
> $line = join ',', @emails;
> }
>
> HTH,
>
> Rob
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
o _ _ _
_o /\_ _ \\o (_)\__/o (_)
_< \_ _>(_) (_)/<_ \_| \ _|/' \/
(_)>(_) (_) (_) (_) (_)' _\o_
http://zapatopi.net/afdb.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]