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 imp
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/(.*):(.
Jose Alves de Castro [mailto:[EMAIL PROTECTED]
Sent: Monday, April 26, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: Re: Break the 65 chars :-)
OK... Greg has just introduced me to some "Normal etiquette" (and also
to the "International" perl golf counting method)...
I apologize fo
* 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 c
OK... Greg has just introduced me to some "Normal etiquette" (and also
to the "International" perl golf counting method)...
I apologize for not having submited my solution so far; the only reason
why I didn't do it was because I thought you might want to give it a try
without being influenced.
He
ROTECTED]'}},$`}for(keys%G){$"=", ";s/$/: @{$G{$_}}/
>
> Greg
>
>
> -Original Message-
> From: Jose Alves de Castro [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 26, 2004 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: Break the 65 char
61?
-pl /:/;[EMAIL PROTECTED]'}},$`}for(keys%G){$"=", ";s/$/: @{$G{$_}}/
Greg
-Original Message-
From: Jose Alves de Castro [mailto:[EMAIL PROTECTED]
Sent: Monday, April 26, 2004 3:55 PM
To: [EMAIL PROTECTED]
Subject: Break the 65 chars :-)
Try to do this in
Try to do this in the least amount of characters possible :-)
Sample Input:
root:admins
administrator:admins
me:users
Output:
admins: root, administrator
users: me
My current solution is now on 65 bytes (that's the size of the whole
script), but I guess more experienced golfers than me will pr