Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: (Golf) Patriotic Golf

by SparkeyG (Curate)
on Sep 17, 2001 at 23:19 UTC ( [id://112933]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Patriotic Golf

@s=("\n","* "x6,"="x13,"\n"," *"x5)x3;@t=("\n","="x26,"\n")x3;print "@ +s@t";
76 Characters.
--SparkeyG
(My first golf)

Update: You're right it doesn't. Didn't notice that. Looks like the rest of you are taking what I made and running w/ it. *shrug*

Replies are listed 'Best First'.
Re: Re: (Golf) Patriotic Golf
by suaveant (Parson) on Sep 18, 2001 at 00:13 UTC
    oooh, with some mods to yours...
    sub f{print(($/,"* "x5,'*',"="x15,$/," *"x5)x3,($/,"="x26,$/)x3)} 123456789_123456789_123456789_123456789_123456789_12345678
    58!

    and it prints the same as the example

                    - Ant
                    - Some of my best work - Fish Dinner

      Actually, it doesn't.
      @s=('*'," *"x5,"="x15,$/);print((@s," *"x5,$/)x3,@s,($/,'='x26,$/)x3)
      and that's a nice round 69! :)

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

        sub f{print((($/,"* "x5,'*',"="x15,$/," *"x5)x4)[0..22],($/,"="x26,$/) +x3)} 123456789_123456789_123456789_123456789_123456789_123456789_1234 +567
        67... and yours can go to 66...
        print((@s=('*'," *"x5,"="x15,$/)," *"x5,$/)x3,@s,($/,'='x26,$/)x3) 123456789_123456789_123456789_123456789_123456789_123456789_123456

                        - Ant
                        - Some of my best work - Fish Dinner

Re: Re: (Golf) Patriotic Golf
by dragonchild (Archbishop) on Sep 17, 2001 at 23:45 UTC
    I count you at 73 (congratz!), but I also don't think it gives what Masem asked for. Using your idea, I got me down to 87 chars:
    @s=('*',' *'x5,'='x15,"\n");@t=(' *'x5,"\n",@s)x3;@u=("\n",'='x26,"\n" +)x3;print@s,@t,@u

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Re: Re: (Golf) Patriotic Golf
by lestrrat (Deacon) on Sep 17, 2001 at 23:46 UTC

    I think your code produces a picture that's a little bit different from the original question.

    Here's one at 83:

    @s=("*"," *"x5,"="x15,"\n");@p=((@s," *"x5,"\n")x3,@s,("\n",'='x26,"\n +")x3);print@p
Re: Re: (Golf) Patriotic Golf
by dga (Hermit) on Sep 19, 2001 at 00:36 UTC

    Looks like the rest of you are taking what I made and running w/ it.

    I think this would exemplify the core philosophy of the Free Software movement. i.e. Take a good idea and refine it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://112933]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found