On Mon, Apr 19, 2004 at 03:05:23PM -0400, Brian Morgan wrote:
> Here is my solution as an example of what I am talking about:
> #BEGIN EXAMPLE
> 
> $max = $ARGV[0];
> $key = $ARGV[1];
> $pad_string = $ARGV[2];
> @key_chars = split(//, $key);
> $count = $#key_chars + 1;
> while ($count <= $max){
>    $key .= $pad_string;
>    $count++;
> }
> print $key;
> 
> #END EXAMPLE
> 
> So can anyone out there compress this down? I can't wait to see the results.

        perl -e'print$_=$ARGV[1],(pop)x(shift()-tr|||c)' 10 abc d  ?

Joy,
`/anick
-- 
Never do anything against conscience even if the state demands it.
- Albert Einstein

Reply via email to