I knew I would learn something from you guys, and so far I have :-)
Thanks, everyone :-)
On Mon, 2004-04-26 at 18:27, A. Pagaltzis wrote:
* Jose Alves De Castro [EMAIL PROTECTED] [2004-04-26 18:36]:
#!/usr/bin/perl -l0n
/:/;$_{$'.$}.= $`,}{map{s/,$/
/;print}%_
Trivial improvement, for
* Jose Alves De Castro [EMAIL PROTECTED] [2004-04-26 18:36]:
#!/usr/bin/perl -l0n
/:/;$_{$'.$}.= $`,}{map{s/,$/
/;print}%_
Trivial improvement, for a gain of 5 chars:
#!/usr/bin/perl -l0p
/:/;$_{$'.$}.= $`,}for(%_){s/,$/
/;
I've tried other clever things, but they all come out
In article [EMAIL PROTECTED],
Allen, Greg [EMAIL PROTECTED] writes:
The output from the -l0[pn] solutions includes C-@ characters (pipe through
cat -v to see...):
admins:^@ root, administrator
[EMAIL PROTECTED]:^@ me
^@
ugh!
A sub-optimal fix:
-p0 s/(.*):(.*)/$_{$2:}.=