I haven't been following the whole thread. How about something like this:
X:\>perl -e "$a.a"
X:\>perl -we "$a.a"
Unquoted string "a" may clash with future reserved word at -e line 1.
Useless use of concatenation (.) or string in void context at -e line 1.
Name "main::a" used only once: possible
--- Animator <[EMAIL PROTECTED]> wrote:
> $ perl -we '$#%a'
>
> 4 bytes, 8 warnings = 2 warnings / bytes
Too easy to be true :)
> Alistair McGlinchy wrote:
> > Puzzle: Write a one-liner longer than (say) 3
> bytes that can improve on 0.77 distinct warnings per
> byte of code. The program should
My first guess:
$ perl -wle 'a+$#'
Unquoted string "a" may clash with future reserved word at -e line 1.
Use of $# is deprecated at -e line 1.
Useless use of addition (+) in void context at -e line 1.
Use of uninitialized value in addition (+) at -e line 1.
Argument "a" isn't numeric in addition (
Jasvir Nagra <[EMAIL PROTECTED]> writes:
> Actually that produces the same error message repeatedly. I think the
> original definition takes that into account.
Gah. Yes, on second reading, I see the "distinct".
--Jed
pgpStAQfMah3F.pgp
Description: PGP signature
On Thu, Sep 02, 2004 at 03:50 +0300, Juho Snellman wrote:
> On Wed, Sep 01, 2004 at 08:34:32PM +0100, McGlinchy, Alistair wrote:
> > Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
> > on 0.77 distinct warnings per byte of code. The program should be -c
> > valid, output nothin
Juho Snellman <[EMAIL PROTECTED]> writes:
> On Wed, Sep 01, 2004 at 08:34:32PM +0100, McGlinchy, Alistair wrote:
>> Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
>> on 0.77 distinct warnings per byte of code. The program should be -c
>> valid, output nothing without -w and s
Actually that produces the same error message repeatedly. I think the
original definition takes that into account.
A variation which generates many different error messages eventually
(equally adhering to the letter if not the spirit):
s
p
o
i
l
e
r
perl -we '$a="a"; eval $a++ whil
On Wed, Sep 01, 2004 at 08:34:32PM +0100, McGlinchy, Alistair wrote:
> Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
> on 0.77 distinct warnings per byte of code. The program should be -c
> valid, output nothing without -w and sound the alarm as much as
> possible with -w.
4
"McGlinchy, Alistair" <[EMAIL PROTECTED]> writes:
> Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
> on 0.77 distinct warnings per byte of code. The program should be -c
> valid, output nothing without -w and sound the alarm as much as
> possible with -w.
It follows the lett
"McGlinchy, Alistair" <[EMAIL PROTECTED]> writes:
[snip]
> Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
> on 0.77 distinct warnings per byte of code. The program should be -c
> valid, output nothing without -w and sound the alarm as much as
> possible with -w.
>
> For those
Golfers,
This list has been a tad quiet for a while so I thought I'd throw in a golfy puzzle.
For some reason the keys on my keyboard temporarily rearranged themselves today and a
quick one-liner I was writing didn't do what I expected; in fact it did nothing at
all. So I added a -w flag and I
11 matches
Mail list logo